[MTD] physmap: fix memory leak on physmap_flash_remove by using devres
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Wed, 26 Nov 2008 10:26:29 +0000 (10:26 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 26 Nov 2008 10:26:29 +0000 (10:26 +0000)
physmap_flash_remove releases only last memory region.  This causes
memory leak if multiple resources were provided.

This patch fixes this leakage by using devm_ functions.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

No differences found