* [PATCH] mfd: asic3: Add missing iounmap() on error asic3_mfd_probe
@ 2022-03-07 7:29 Miaoqian Lin
2022-03-21 8:55 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Miaoqian Lin @ 2022-03-07 7:29 UTC (permalink / raw)
To: Lee Jones, Magnus Damm, Ian Molton, Samuel Ortiz, linux-kernel; +Cc: linmq006
Add the missing iounmap() before return from asic3_mfd_probe
in the error handling case.
Fixes: 64e8867ba809 ("mfd: tmio_mmc hardware abstraction for CNF area")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/mfd/asic3.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 8d58c8df46cf..56338f9dbd0b 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -906,14 +906,14 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
ret = mfd_add_devices(&pdev->dev, pdev->id,
&asic3_cell_ds1wm, 1, mem, asic->irq_base, NULL);
if (ret < 0)
- goto out;
+ goto out_unmap;
}
if (mem_sdio && (irq >= 0)) {
ret = mfd_add_devices(&pdev->dev, pdev->id,
&asic3_cell_mmc, 1, mem_sdio, irq, NULL);
if (ret < 0)
- goto out;
+ goto out_unmap;
}
ret = 0;
@@ -927,8 +927,12 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
ret = mfd_add_devices(&pdev->dev, 0,
asic3_cell_leds, ASIC3_NUM_LEDS, NULL, 0, NULL);
}
+ return ret;
- out:
+out_unmap:
+ if (asic->tmio_cnf)
+ iounmap(asic->tmio_cnf);
+out:
return ret;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: asic3: Add missing iounmap() on error asic3_mfd_probe
2022-03-07 7:29 [PATCH] mfd: asic3: Add missing iounmap() on error asic3_mfd_probe Miaoqian Lin
@ 2022-03-21 8:55 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2022-03-21 8:55 UTC (permalink / raw)
To: Miaoqian Lin; +Cc: Magnus Damm, Ian Molton, Samuel Ortiz, linux-kernel
On Mon, 07 Mar 2022, Miaoqian Lin wrote:
> Add the missing iounmap() before return from asic3_mfd_probe
> in the error handling case.
>
> Fixes: 64e8867ba809 ("mfd: tmio_mmc hardware abstraction for CNF area")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> drivers/mfd/asic3.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-21 8:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07 7:29 [PATCH] mfd: asic3: Add missing iounmap() on error asic3_mfd_probe Miaoqian Lin
2022-03-21 8:55 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.