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.2.35~41 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=016ede1a94fbd90c2a24a82599859f9e46e3c298;p=pandora-kernel.git mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions() commit 5a6ea4af0907f995dc06df21a9c9ef764c7cd3bc upstream. 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 Signed-off-by: Sachin Kamat Signed-off-by: David Woodhouse Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed