summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKevin Smith <kevin.smith@elecsyscorp.com>2016-01-14 16:01:36 +0000
committerScott Wood <scottwood@freescale.com>2016-02-12 17:13:42 -0600
commitb7d3e4a63580198237bdce989d5514476056ee16 (patch)
tree24c801b3e6d6cb8e0e8efa7164fd5623ea0ef469 /drivers
parent549d7c0e091de6759deef4202129a57480f6414c (diff)
downloadu-boot-imx-b7d3e4a63580198237bdce989d5514476056ee16.zip
u-boot-imx-b7d3e4a63580198237bdce989d5514476056ee16.tar.gz
u-boot-imx-b7d3e4a63580198237bdce989d5514476056ee16.tar.bz2
mtd: pxa3xx_nand: Correct null dereference
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@elecsyscorp.com> Cc: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c7
1 files changed, 0 insertions, 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;