mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
[ Upstream commit73f5fc5f88
] 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:695093e38c
("iommu/fsl: Freescale PAMU driver and iommu implementation.") Signed-off-by: Yuan Can <yuancan@huawei.com> Link: https://lore.kernel.org/r/20221121082022.19091-1-yuancan@huawei.com Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b0637f4bd4
commit
de7eb55009
1 changed files with 1 additions and 1 deletions
|
@ -868,7 +868,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
|
||||||
ret = create_csd(ppaact_phys, mem_size, csd_port_id);
|
ret = create_csd(ppaact_phys, mem_size, csd_port_id);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "could not create coherence subdomain\n");
|
dev_err(dev, "could not create coherence subdomain\n");
|
||||||
return ret;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue