linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] parisc: ccio-dma: Add missing iounmap in error path in ccio_probe()
@ 2022-08-24  9:36 Yang Yingliang
  2022-08-24 19:20 ` Helge Deller
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2022-08-24  9:36 UTC (permalink / raw)
  To: linux-kernel, linux-parisc; +Cc: liqiong, deller

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

Fixes: d46c742f827f ("parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/parisc/ccio-dma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index f223afe47d10..a66386043aa6 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -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;
 	}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-24 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24  9:36 [PATCH -next] parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() Yang Yingliang
2022-08-24 19:20 ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).