Commit 2f8cf5f6 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Mark Brown

spi: rpc-if: Fix RPM imbalance in probe error path

If rpcif_hw_init() fails, Runtime PM is left enabled.

Fixes: b04cc0d9 ("memory: renesas-rpc-if: Add support for RZ/G2L")
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/1c78a1f447d019bb66b6e7787f520ae78821e2ae.1648562287.git.geert+renesas@glider.beSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 31231092
......@@ -158,14 +158,18 @@ static int rpcif_spi_probe(struct platform_device *pdev)
error = rpcif_hw_init(rpc, false);
if (error)
return error;
goto out_disable_rpm;
error = spi_register_controller(ctlr);
if (error) {
dev_err(&pdev->dev, "spi_register_controller failed\n");
rpcif_disable_rpm(rpc);
goto out_disable_rpm;
}
return 0;
out_disable_rpm:
rpcif_disable_rpm(rpc);
return error;
}
......
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