diff options
author | Tony Lindgren <tony@atomide.com> | 2018-05-18 19:30:07 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-05-21 17:44:25 +0200 |
commit | 7e48e23a1f4a50f93ac1073f1326e0a73829b631 (patch) | |
tree | 96621dc530bf77907bb558b303b4a9ee97888234 /drivers/spi/spi.c | |
parent | spi: ti-qspi: Make sure res_mmap != NULL before dereferencing it (diff) | |
download | linux-7e48e23a1f4a50f93ac1073f1326e0a73829b631.tar.xz linux-7e48e23a1f4a50f93ac1073f1326e0a73829b631.zip |
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 <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/spi/spi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 8ee1ba13eb23..20b5b2754830 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); |