]> Git Repo - linux.git/commitdiff
spi: jcore: disable clock when registering spi conroller failed
authorTakuo Koguchi <[email protected]>
Thu, 7 Dec 2017 10:11:41 +0000 (19:11 +0900)
committerMark Brown <[email protected]>
Wed, 13 Dec 2017 19:08:24 +0000 (19:08 +0000)
 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]>
drivers/spi/spi-jcore.c

index cebfea5faa4be247e2b8e145d96c3925c6a32ec7..dafed6280df3285055306df409070a73ba8283cb 100644 (file)
@@ -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;
 
This page took 0.055021 seconds and 4 git commands to generate.