Thread (77 messages) 77 messages, 3 authors, 2021-06-29
STALE1801d REVIEWED: 1 (0M)

[PATCH 4.9 16/71] dmaengine: stedma40: add missing iounmap() on error in d40_probe()

From: Sasha Levin <sashal@kernel.org>
Date: 2021-06-28 15:19:34
Also in: lkml
Subsystem: arm/nomadik/ux500 architectures, dma generic offload engine subsystem, the rest · Maintainers: Linus Walleij, Vinod Koul, Linus Torvalds

From: Yang Yingliang <redacted>

[ Upstream commit fffdaba402cea79b8d219355487d342ec23f91c6 ]

Add the missing iounmap() before return from d40_probe()
in the error handling case.

Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Yang Yingliang <redacted>
Reviewed-by: Linus Walleij <redacted>
Link: https://lore.kernel.org/r/20210518141108.1324127-1-yangyingliang@huawei.com (local)
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/dma/ste_dma40.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 68b41daab3a8..bf7105814ee7 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -3674,6 +3674,9 @@ static int __init d40_probe(struct platform_device *pdev)
 
 	kfree(base->lcla_pool.base_unaligned);
 
+	if (base->lcpa_base)
+		iounmap(base->lcpa_base);
+
 	if (base->phy_lcpa)
 		release_mem_region(base->phy_lcpa,
 				   base->lcpa_size);
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help