Commit 16eab16e authored by Takuo Koguchi's avatar Takuo Koguchi Committed by Mark Brown

spi: jcore: disable clock when registering spi conroller failed

 When probe function fails in registering the spi controller, the clock
 should remain disabled.

Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: default avatarTakuo Koguchi <takuo.koguchi.sw@hitachi.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4fbd8d19
...@@ -198,8 +198,10 @@ static int jcore_spi_probe(struct platform_device *pdev) ...@@ -198,8 +198,10 @@ static int jcore_spi_probe(struct platform_device *pdev)
/* Register our spi controller */ /* Register our spi controller */
err = devm_spi_register_master(&pdev->dev, master); err = devm_spi_register_master(&pdev->dev, master);
if (err) if (err) {
clk_disable(clk);
goto exit; goto exit;
}
return 0; return 0;
......
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