]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mtd: pxa3xx_nand: Correct null dereference
authorKevin Smith <kevin.smith@elecsyscorp.com>
Thu, 14 Jan 2016 16:01:36 +0000 (16:01 +0000)
committerScott Wood <scottwood@freescale.com>
Fri, 12 Feb 2016 23:13:42 +0000 (17:13 -0600)
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>
drivers/mtd/nand/pxa3xx_nand.c

index f65b499beb308c9cb6a29c550b280e051699a40e..9202459b0f9dfd03754ed77732c55a4888e2bca3 100644 (file)
@@ -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;