* [PATCH] spi: jcore: disable clock when registering spi conroller failed
@ 2017-12-07 10:11 Takuo Koguchi
2017-12-07 11:55 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Takuo Koguchi @ 2017-12-07 10:11 UTC (permalink / raw)
To: linux-kernel, khoroshilov, takuo.koguchi, takuo.koguchi.sw
Cc: Mark Brown, linux-spi
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] 3+ messages in thread
* Re: [PATCH] spi: jcore: disable clock when registering spi conroller failed
@ 2017-12-07 11:55 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2017-12-07 11:55 UTC (permalink / raw)
To: Takuo Koguchi; +Cc: linux-kernel, khoroshilov, takuo.koguchi.sw, linux-spi
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
On Thu, Dec 07, 2017 at 07:11:41PM +0900, Takuo Koguchi wrote:
> When probe function fails in registering the spi controller, the clock
> should remain disabled.
>
> Found by Linux Driver Verification project (linuxtesting.org).
I seem to have got three copies of this from you in a very short time?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: jcore: disable clock when registering spi conroller failed
@ 2017-12-07 11:55 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2017-12-07 11:55 UTC (permalink / raw)
To: Takuo Koguchi
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
khoroshilov-ufN2psIa012HXe+LvDLADg,
takuo.koguchi.sw-FCd8Q96Dh0JBDgjK7y7TUQ,
linux-spi-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
On Thu, Dec 07, 2017 at 07:11:41PM +0900, Takuo Koguchi wrote:
> When probe function fails in registering the spi controller, the clock
> should remain disabled.
>
> Found by Linux Driver Verification project (linuxtesting.org).
I seem to have got three copies of this from you in a very short time?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-07 11:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 10:11 [PATCH] spi: jcore: disable clock when registering spi conroller failed Takuo Koguchi
2017-12-07 11:55 ` Mark Brown
2017-12-07 11:55 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.