OSDN Git Service

mtd: physmap_of: Release resources on error
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Thu, 4 Oct 2018 13:34:45 +0000 (15:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Nov 2019 13:44:22 +0000 (14:44 +0100)
commite9e15d2c4dcf5dae915843d7593563821266ac81
tree6f49b6a9c1114220c3cd356b2aa124d622adab3c
parent1665d668a39ecd4809f73aa7b14e58f9a2b7da60
mtd: physmap_of: Release resources on error

[ Upstream commit ef0de747f7ad179c7698a5b0e28db05f18ecbf57 ]

During probe, if there was an error the memory region and the memory
map were not properly released.This can lead a system unusable if
deferred probe is in use.

Replace mem_request and map with devm_ioremap_resource

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/maps/physmap_of.c