Skip to content

Commit 73f5fc5

Browse files
Yuan Canjoergroedel
authored andcommitted
iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
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: 695093e ("iommu/fsl: Freescale PAMU driver and iommu implementation.") Signed-off-by: Yuan Can <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 8330b9e commit 73f5fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/fsl_pamu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
868868
ret = create_csd(ppaact_phys, mem_size, csd_port_id);
869869
if (ret) {
870870
dev_err(dev, "could not create coherence subdomain\n");
871-
return ret;
871+
goto error;
872872
}
873873
}
874874

0 commit comments

Comments
 (0)