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)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 Nov 2020 03:50:14 +0000 (14:50 +1100)
commitffa1797040c5da391859a9556be7b735acbe1242
tree68141856fee3baeab18fedb8f67a15fc259f2d50
parentf5eca0b279117f25020112a2f65ec9c3ea25f3ac
powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()

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
arch/powerpc/sysdev/mpic_msgr.c