don't try to create mtd partitions on bcm947xx when the trx header is not found ...
[openwrt-10.03/.git] / target / linux / brcm-2.6 / patches / 002-flash-map.patch
index a8ed9092c0b9983944f5a45093c5e2b15a6c6460..9d568930d2ae826b2c6684b6f9e57d2ef46f8b6d 100644 (file)
@@ -1,7 +1,7 @@
 diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/bcm47xx-flash.c
 --- linux.old/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100
 +++ linux.dev/drivers/mtd/maps/bcm47xx-flash.c 2006-06-23 19:54:06.000000000 +0200
-@@ -0,0 +1,451 @@
+@@ -0,0 +1,452 @@
 +/*
 + *  Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
 + *  Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
@@ -326,7 +326,8 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
 +{
 +      int cfe_size;
 +
-+      cfe_size = find_cfe_size(mtd,size);
++      if ((cfe_size = find_cfe_size(mtd,size)) < 0)
++              return NULL;
 +
 +      /* boot loader */
 +      bcm947xx_parts[0].offset = 0;