summaryrefslogtreecommitdiff
path: root/drivers/uio
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2023-08-08 20:38:27 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-22 13:41:55 +0200
commit979ca1ca1f2c87386deffbeb01767bb40448b4a1 (patch)
treec08a12b709baef9ef457ae9bd2e12ee2e463652b /drivers/uio
parente75850b4573a092078d5ff1493d3d9ee16b98821 (diff)
downloadlwn-979ca1ca1f2c87386deffbeb01767bb40448b4a1.tar.gz
lwn-979ca1ca1f2c87386deffbeb01767bb40448b4a1.zip
uio: pruss: fix missing iounmap() in pruss_probe()
platform_get_irq() is called after ioremap(), if it fails, iounmap() needs be called in error the path. Fixes: 2fd84b9b839c ("uio: pruss: fix to check return value of platform_get_irq() in pruss_probe()") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20230808123827.560603-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uio')
-rw-r--r--drivers/uio/uio_pruss.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/uio/uio_pruss.c b/drivers/uio/uio_pruss.c
index 122c38e2fbbd..77e2dc404885 100644
--- a/drivers/uio/uio_pruss.c
+++ b/drivers/uio/uio_pruss.c
@@ -177,7 +177,7 @@ static int pruss_probe(struct platform_device *pdev)
ret = platform_get_irq(pdev, 0);
if (ret < 0)
- goto err_free_ddr_vaddr;
+ goto err_unmap;
gdev->hostirq_start = ret;
gdev->pintc_base = pdata->pintc_base;
@@ -215,6 +215,7 @@ err_unloop:
for (i = 0, p = gdev->info; i < cnt; i++, p++) {
uio_unregister_device(p);
}
+err_unmap:
iounmap(gdev->prussio_vaddr);
err_free_ddr_vaddr:
dma_free_coherent(dev, extram_pool_sz, gdev->ddr_vaddr,