* [PATCH] iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
@ 2022-11-21 8:20 Yuan Can
2022-11-22 8:37 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Yuan Can @ 2022-11-21 8:20 UTC (permalink / raw)
To: joro, will, robin.murphy, timur, alex.williamson, Varun.Sethi,
iommu
Cc: yuancan
The fsl_pamu_probe() returns directly when create_csd() failed, leaving
irq and memories unreleased.
Fix by jumping to error if create_csd() returns error.
Fixes: 695093e38c3e ("iommu/fsl: Freescale PAMU driver and iommu implementation.")
Signed-off-by: Yuan Can <yuancan@huawei.com>
---
drivers/iommu/fsl_pamu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c
index 0d03f837a5d4..402d14a61141 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -868,7 +868,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
ret = create_csd(ppaact_phys, mem_size, csd_port_id);
if (ret) {
dev_err(dev, "could not create coherence subdomain\n");
- return ret;
+ goto err;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
2022-11-21 8:20 [PATCH] iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe() Yuan Can
@ 2022-11-22 8:37 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2022-11-22 8:37 UTC (permalink / raw)
To: Yuan Can; +Cc: will, robin.murphy, timur, alex.williamson, Varun.Sethi, iommu
On Mon, Nov 21, 2022 at 08:20:22AM +0000, Yuan Can wrote:
> The fsl_pamu_probe() returns directly when create_csd() failed, leaving
> irq and memories unreleased.
> Fix by jumping to error if create_csd() returns error.
>
> Fixes: 695093e38c3e ("iommu/fsl: Freescale PAMU driver and iommu implementation.")
> Signed-off-by: Yuan Can <yuancan@huawei.com>
> ---
> drivers/iommu/fsl_pamu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-22 8:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 8:20 [PATCH] iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe() Yuan Can
2022-11-22 8:37 ` Joerg Roedel
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.