]> Pileus Git - ~andy/linux/commitdiff
spi/s3c64xx: Add missing pm_runtime_put on setup fail
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Thu, 17 Oct 2013 12:45:41 +0000 (14:45 +0200)
committerMark Brown <broonie@linaro.org>
Thu, 17 Oct 2013 23:34:09 +0000 (00:34 +0100)
pm_runtime_put() wasn't called if clock rate could not be set up in
s3c64xx_spi_setup() leading to invalid count of device pm_runtime usage.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-s3c64xx.c

index 05fab71c1c45751f3eedc0f5ea621ee8b7ad5c8d..ae07c3afe956bc24c41fec63ad6f67759d10ea1e 100644 (file)
@@ -1121,6 +1121,7 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
        return 0;
 
 setup_exit:
+       pm_runtime_put(&sdd->pdev->dev);
        /* setup() returns with device de-selected */
        disable_cs(sdd, spi);