mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
media: omap3isp: Fix memleak in isp_probe
[ Upstream commitd8fc21c170] When devm_ioremap_resource() fails, isp should be freed just like other error paths in isp_probe. Fixes:8644cdf972("[media] omap3isp: Replace many MMIO regions by two") Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
55d6b85201
commit
3ff34591ab
@@ -2273,8 +2273,10 @@ static int isp_probe(struct platform_device *pdev)
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, i);
|
||||
isp->mmio_base[map_idx] =
|
||||
devm_ioremap_resource(isp->dev, mem);
|
||||
if (IS_ERR(isp->mmio_base[map_idx]))
|
||||
return PTR_ERR(isp->mmio_base[map_idx]);
|
||||
if (IS_ERR(isp->mmio_base[map_idx])) {
|
||||
ret = PTR_ERR(isp->mmio_base[map_idx]);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
ret = isp_get_clocks(isp);
|
||||
|
||||
Reference in New Issue
Block a user