* [PATCH] spi: jcore: disable clock when registering spi conroller
@ 2017-12-07 10:09 Takuo Koguchi
0 siblings, 0 replies; only message in thread
From: Takuo Koguchi @ 2017-12-07 10:09 UTC (permalink / raw)
To: linux-kernel, khoroshilov, takuo.koguchi, takuo.koguchi.sw
Cc: Mark Brown, linux-spi
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 <takuo.koguchi.sw@hitachi.com>
---
Compiled test only, no runtime test done.
drivers/spi/spi-jcore.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-jcore.c b/drivers/spi/spi-jcore.c
index cebfea5..dafed62 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;
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-07 10:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 10:09 [PATCH] spi: jcore: disable clock when registering spi conroller Takuo Koguchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).