From: Sachin Kamat Date: Tue, 25 Sep 2012 09:57:13 +0000 (+0530) Subject: mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions() X-Git-Tag: v3.8-rc1~47^2~91 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecbcbc7b75bb1b7596fca2d588d2f7539dc4e581;p=pandora-kernel.git mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions() The pointer returned by kzalloc should be tested for NULL to avoid potential NULL pointer dereference later. Incorrect pointer was being tested for NULL. Bug introduced by commit fbcf62a3 (mtd: physmap_of: move parse_obsolete_partitions to become separate parser). This patch fixes this bug. Signed-off-by: Sachin Kamat Cc: stable@vger.kernel.org [3.2+] Signed-off-by: Artem Bityutskiy --- Reading git-diff-tree failed