]> git.baikalelectronics.ru Git - kernel.git/commitdiff
parisc: ccio-dma: Add missing iounmap in error path in ccio_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 24 Aug 2022 09:36:57 +0000 (17:36 +0800)
committerHelge Deller <deller@gmx.de>
Tue, 13 Sep 2022 06:50:31 +0000 (08:50 +0200)
Add missing iounmap() before return from ccio_probe(), if ccio_init_resources()
fails.

Fixes: 50660f0e1bae ("parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/parisc/ccio-dma.c

index f223afe47d1049849e88e678e994b6549bf3d03e..a66386043aa6643d87216005c426da904a0408c7 100644 (file)
@@ -1546,6 +1546,7 @@ static int __init ccio_probe(struct parisc_device *dev)
        }
        ccio_ioc_init(ioc);
        if (ccio_init_resources(ioc)) {
+               iounmap(ioc->ioc_regs);
                kfree(ioc);
                return -ENOMEM;
        }