Commit 672647af authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Tony Lindgren

bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe

The error handling code in omap_ocp2scp_probe fails to invoke
pm_runtime_disable and fails to initialize return value in
certain cases. Fix it here.
Signed-off-by: default avatarKishon Vijay Abraham I <>
Signed-off-by: default avatarSekhar Nori <>
Signed-off-by: default avatarTony Lindgren <>
parent ff570a01
......@@ -70,8 +70,10 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
if (!of_device_is_compatible(np, "ti,am437x-ocp2scp")) {
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(regs))
goto err0;
if (IS_ERR(regs)) {
ret = PTR_ERR(regs);
goto err1;
reg = readl_relaxed(regs + OCP2SCP_TIMING);
......@@ -83,6 +85,9 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
return 0;
device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment