Commit 73f5fc5f authored by Yuan Can's avatar Yuan Can Committed by Joerg Roedel
Browse files

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: 695093e3 ("iommu/fsl: Freescale PAMU driver and iommu implementation.")
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
Link: https://lore.kernel.org/r/20221121082022.19091-1-yuancan@huawei.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 8330b9eb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 error;
		}
	}