mtd/drivers/mtd/nand s3c2410.c,1.4,1.5

bjd at infradead.org bjd at infradead.org
Tue Oct 12 06:10:18 EDT 2004


Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv16357

Modified Files:
	s3c2410.c 
Log Message:
fixed check for NULL set


Index: s3c2410.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/s3c2410.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- s3c2410.c	12 Oct 2004 00:50:32 -0000	1.4
+++ s3c2410.c	12 Oct 2004 10:10:15 -0000	1.5
@@ -9,6 +9,7 @@
  *	21-Sep-2004  BJD  Initial version
  *	23-Sep-2004  BJD  Mulitple device support
  *	28-Sep-2004  BJD  Fixed ECC placement for Hardware mode
+ *	12-Oct-2004  BJD  Fixed errors in use of platform data
  *
  * $Id$
  *
@@ -491,13 +492,16 @@
 				      struct s3c2410_nand_mtd *mtd,
 				      struct s3c2410_nand_set *set)
 {
+	if (set == NULL)
+		return add_mtd_device(&mtd->mtd);
+
 	if (set->nr_partitions > 0 && set->partitions != NULL) {
 		return add_mtd_partitions(&mtd->mtd,
 					  set->partitions,
 					  set->nr_partitions);
-	} else {
-		return add_mtd_device(&mtd->mtd);
 	}
+
+	return add_mtd_device(&mtd->mtd);
 }
 #else
 static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,





More information about the linux-mtd-cvs mailing list