From: Lukas Wunner <[email protected]>

commit 65e318e17358a3fd4fcb5a69d89b14016dee2f06 upstream.

The PXA2xx SPI driver releases a runtime PM ref in the probe error path
even though it hasn't acquired a ref earlier.

Apparently commit e2b714afee32 ("spi: pxa2xx: Disable runtime PM if
controller registration fails") sought to copy-paste the invocation of
pm_runtime_disable() from pxa2xx_spi_remove(), but erroneously copied
the call to pm_runtime_put_noidle() as well.  Drop it.

Fixes: e2b714afee32 ("spi: pxa2xx: Disable runtime PM if controller 
registration fails")
Signed-off-by: Lukas Wunner <[email protected]>
Reviewed-by: Jarkko Nikula <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Cc: [email protected] # v4.17+
Cc: Jarkko Nikula <[email protected]>
Link: 
https://lore.kernel.org/r/58b2ac6942ca1f91aaeeafe512144bc5343e1d84.1590408496.git.lu...@wunner.de
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/spi/spi-pxa2xx.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1888,7 +1888,6 @@ static int pxa2xx_spi_probe(struct platf
        return status;
 
 out_error_pm_runtime_enabled:
-       pm_runtime_put_noidle(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
 
 out_error_clock_enabled:


Reply via email to