From: Tony Lindgren Date: Fri, 18 May 2018 17:30:07 +0000 (-0700) Subject: spi: Add missing pm_runtime_put_noidle() after failed get X-Git-Tag: v4.18-rc1~184^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e48e23a1f4a50f93ac1073f1326e0a73829b631;p=thirdparty%2Fkernel%2Flinux.git spi: Add missing pm_runtime_put_noidle() after failed get If pm_runtime_get_sync() fails we should call pm_runtime_put_noidle(). This is probably not a critical fix as we should only hit this when things are broken elsewhere. Signed-off-by: Tony Lindgren Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 8ee1ba13eb234..20b5b2754830e 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1212,6 +1212,7 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread) if (!was_busy && ctlr->auto_runtime_pm) { ret = pm_runtime_get_sync(ctlr->dev.parent); if (ret < 0) { + pm_runtime_put_noidle(ctlr->dev.parent); dev_err(&ctlr->dev, "Failed to power device: %d\n", ret); mutex_unlock(&ctlr->io_mutex);