]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()
authorQinglang Miao <miaoqinglang@huawei.com>
Wed, 28 Oct 2020 09:15:51 +0000 (17:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jan 2021 12:37:39 +0000 (13:37 +0100)
commit3569349e760c7903fd6990b835f64fdc98c016a8
treec648fca8363cd61821b776a5744d39c172aec4ea
parent63b61ea7cd96652d250845d35c80b1aaa865503d
powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()

[ Upstream commit ffa1797040c5da391859a9556be7b735acbe1242 ]

I noticed that iounmap() of msgr_block_addr before return from
mpic_msgr_probe() in the error handling case is missing. So use
devm_ioremap() instead of just ioremap() when remapping the message
register block, so the mapping will be automatically released on
probe failure.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201028091551.136400-1-miaoqinglang@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/sysdev/mpic_msgr.c