]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dmaengine: stedma40: add missing iounmap() on error in d40_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 18 May 2021 14:11:08 +0000 (22:11 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:49:31 +0000 (08:49 -0400)
[ 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 <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210518141108.1324127-1-yangyingliang@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/ste_dma40.c

index 0fede051f4e1c588f1e57ef4575069b81ebd169d..e6d3ed1de374a5e7f0e388fcd8736eb98355ebce 100644 (file)
@@ -3715,6 +3715,9 @@ failure:
 
                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);