Message ID | 58b2ac6942ca1f91aaeeafe512144bc5343e1d84.1590408496.git.lukas@wunner.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 65e318e17358a3fd4fcb5a69d89b14016dee2f06 |
Headers | show |
Series | Intel SPI unbind fixes | expand |
On Mon, May 25, 2020 at 02:25:03PM +0200, Lukas Wunner wrote: > 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. Looks like correct fix to me. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Fixes: e2b714afee32 ("spi: pxa2xx: Disable runtime PM if controller registration fails") > Signed-off-by: Lukas Wunner <lukas@wunner.de> > Cc: stable@vger.kernel.org # v4.17+ > Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com> > --- > drivers/spi/spi-pxa2xx.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c > index 2ecf0d8cd9f7..6721910e5f2a 100644 > --- a/drivers/spi/spi-pxa2xx.c > +++ b/drivers/spi/spi-pxa2xx.c > @@ -1894,7 +1894,6 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) > return status; > > out_error_pm_runtime_enabled: > - pm_runtime_put_noidle(&pdev->dev); > pm_runtime_disable(&pdev->dev); > > out_error_clock_enabled: > -- > 2.25.0 >
On 5/25/20 4:12 PM, Andy Shevchenko wrote: > On Mon, May 25, 2020 at 02:25:03PM +0200, Lukas Wunner wrote: >> 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. > > Looks like correct fix to me. > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Yes, I think it was blind copy-paste from pxa2xx_spi_remove() where pm_runtime_put_noidle() is needed due the pm_runtime_get_sync() call but not in pxa2xx_spi_probe(). Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 2ecf0d8cd9f7..6721910e5f2a 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1894,7 +1894,6 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) return status; out_error_pm_runtime_enabled: - pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); out_error_clock_enabled:
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 <lukas@wunner.de> Cc: stable@vger.kernel.org # v4.17+ Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com> --- drivers/spi/spi-pxa2xx.c | 1 - 1 file changed, 1 deletion(-)