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.7-rc7~5^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a6ea4af0907f995dc06df21a9c9ef764c7cd3bc;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. Cc: Dmitry Eremin-Solenikov Cc: Artem Bityutskiy Cc: stable@kernel.org Signed-off-by: Sachin Kamat Signed-off-by: David Woodhouse --- Reading git-diff-tree failed