mtd: maps: pxa2xx-flash: fix memory leak in probe
authorZheng Yongjun <zhengyongjun3@huawei.com>
Sat, 19 Nov 2022 07:33:07 +0000 (07:33 +0000)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 24 Nov 2022 11:33:38 +0000 (12:33 +0100)
commit2399401feee27c639addc5b7e6ba519d3ca341bf
treee9a25b68a58abe4cca109f4563cc1f3e426a0688
parent56570bdad5e31c5c538cd6efff5c4510256e1bb4
mtd: maps: pxa2xx-flash: fix memory leak in probe

Free 'info' upon remapping error to avoid a memory leak.

Fixes: e644f7d62894 ("[MTD] MAPS: Merge Lubbock and Mainstone drivers into common PXA2xx driver")
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
[<miquel.raynal@bootlin.com>: Reword the commit log]
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20221119073307.22929-1-zhengyongjun3@huawei.com
drivers/mtd/maps/pxa2xx-flash.c