mtd: pxa3xx_nand: NULL dereference in pxa3xx_nand_probe
commitdc43a25f4bdf3189f03a06f75943f3c0121c4e11
authorDan Carpenter <error27@gmail.com>
Thu, 6 Jan 2011 14:05:36 +0000 (6 17:05 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:15:09 +0000 (17 15:15 -0800)
treed1cd347fd7020f35d0b6815d7b82df5518e0274b
parent874349687931814d5afa98081795a77ce3cd5231
mtd: pxa3xx_nand: NULL dereference in pxa3xx_nand_probe

commit 52d039fdaa78c5a9f9bc2940ad58d7ed76b8336d upstream.

"info->cmdset" gets dereferenced in __readid() so it needs to be
initialized earlier in the function.  This bug was introduced in
18c81b1828f8 "mtd: pxa3xx_nand: remove the flash info in driver
structure".

Reported-and-tested-by: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/mtd/nand/pxa3xx_nand.c