]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: Fix compile failure and error path in physmap.c
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 20 Oct 2009 16:23:33 +0000 (12:23 -0400)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 20 Oct 2009 21:29:27 +0000 (06:29 +0900)
commit3a50e9c969b4b7a77c48a946be4b9f55cabed03a
tree942c3de936655fb78a9e356a4cea6b056687c7da
parent9ee761c11824781d92ed3d932e219997dffa6997
mtd: Fix compile failure and error path in physmap.c

Commit c9597e68c926b2ca76efd2732785f33b1093cdbe ("mtd: Fix kernel NULL
pointer dereference in physmap.c") introduced a couple of bugs.

It neglected to run the loop of map_destroy() calls in
physmap_flash_remove(), if !info->cmtd, which would happen if that
function was called to clean up errors during probe.

It also failed to compile if CONFIG_MTD_PARTITIONS was not defined.

Reported-By: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/maps/physmap.c