Skip to content

Commit

Permalink
parisc: ccio-dma: Add missing iounmap in error path in ccio_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit 38238be ]

Add missing iounmap() before return from ccio_probe(), if ccio_init_resources()
fails.

Fixes: d46c742 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yang Yingliang authored and gregkh committed Sep 23, 2022
1 parent 5f285e4 commit 8fd2723
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/parisc/ccio-dma.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8fd2723

Please sign in to comment.