Commit 39056e8a authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Daniel Lezcano

thermal: rcar_thermal: Handle probe error gracefully

If the common register memory resource is not available the driver needs
to fail gracefully to disable PM. Instead of returning the error
directly store it in ret and use the already existing error path.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200310114709.1483860-1-niklas.soderlund+renesas@ragnatech.se
parent a9d8e61b
...@@ -521,8 +521,10 @@ static int rcar_thermal_probe(struct platform_device *pdev) ...@@ -521,8 +521,10 @@ static int rcar_thermal_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, res = platform_get_resource(pdev, IORESOURCE_MEM,
mres++); mres++);
common->base = devm_ioremap_resource(dev, res); common->base = devm_ioremap_resource(dev, res);
if (IS_ERR(common->base)) if (IS_ERR(common->base)) {
return PTR_ERR(common->base); ret = PTR_ERR(common->base);
goto error_unregister;
}
idle = 0; /* polling delay is not needed */ idle = 0; /* polling delay is not needed */
} }
......
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