aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakuo Koguchi <[email protected]>2017-12-07 19:11:41 +0900
committerMark Brown <[email protected]>2017-12-13 19:08:24 +0000
commit16eab16ef9382704ff12c68ef52d62c68219cbb9 (patch)
tree537c68eb437b50897b75f2277692304328bacb45
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff)
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: Takuo Koguchi <[email protected]> Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--drivers/spi/spi-jcore.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-jcore.c b/drivers/spi/spi-jcore.c
index cebfea5faa4b..dafed6280df3 100644
--- a/drivers/spi/spi-jcore.c
+++ b/drivers/spi/spi-jcore.c
@@ -198,8 +198,10 @@ static int jcore_spi_probe(struct platform_device *pdev)
/* Register our spi controller */
err = devm_spi_register_master(&pdev->dev, master);
- if (err)
+ if (err) {
+ clk_disable(clk);
goto exit;
+ }
return 0;