[PATCH 11/15] mtd nand i.MX: fix compilation for unsupported SoC

Sascha Hauer s.hauer at pengutronix.de
Fri Oct 26 02:59:04 EDT 2012


Add a default case when all if(nfc_is_*) else if()
return false to prevent a compiler warning.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/mtd/nand/nand_imx.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c
index b1b7f55..ef927c5 100644
--- a/drivers/mtd/nand/nand_imx.c
+++ b/drivers/mtd/nand/nand_imx.c
@@ -1175,6 +1175,9 @@ static int __init imxnd_probe(struct device_d *dev)
 		oob_smallpage = &nandv2_hw_eccoob_smallpage;
 		oob_largepage = &nandv2_hw_eccoob_largepage;
 		oob_4kpage = &nandv2_hw_eccoob_4k;
+	} else {
+		err = -EINVAL;
+		goto escan;
 	}
 
 	host->dev = dev;
-- 
1.7.10.4




More information about the barebox mailing list