[U-Boot] [PATCH v2 1/3] mtd: pxa3xx_nand: Correct null dereference
Kevin Smith
kevin.smith at elecsyscorp.com
Thu Jan 14 17:01:36 CET 2016
Correct a null pointer dereference in board_nand_init(). Zeroed
memory was allocated, then immediately dereferenced. The
dereference is completely removed, since this pointer is later
initialized in alloc_nand_resources.
Signed-off-by: Kevin Smith <kevin.smith at elecsyscorp.com>
Cc: Stefan Roese <sr at denx.de>
Cc: Luka Perkov <luka.perkov at sartura.hr>
Cc: Scott Wood <scottwood at freescale.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index f65b499..9202459 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1606,13 +1606,6 @@ void board_nand_init(void)
if (!info)
return;
- /*
- * If CONFIG_SYS_NAND_SELF_INIT is defined, each driver is responsible
- * for instantiating struct nand_chip, while drivers/mtd/nand/nand.c
- * still provides a "struct mtd_info nand_info" instance.
- */
- info->host[0]->mtd = &nand_info[0];
-
ret = pxa3xx_nand_probe(info);
if (ret)
return;
--
2.4.6
More information about the U-Boot
mailing list