]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions()
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 25 Sep 2012 09:57:13 +0000 (15:27 +0530)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 17 Oct 2012 10:28:31 +0000 (13:28 +0300)
commit52b11c45801bb5e6a3d10d6262f0dea89c006e0f
treeb24f02285bc8cfe7c5b1ea41b56a26a59ce1aabd
parente43987285a5f9dda037817f8a3fb13bd1b6c31b4
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 <sachin.kamat@linaro.org>
Cc: stable@vger.kernel.org [3.2+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/ofpart.c