Messages in this thread Patch in this message | | | From | Dinghao Liu <> | Subject | [PATCH] spi: spi-ti-qspi: Fix runtime PM imbalance on error | Date | Thu, 21 May 2020 15:46:43 +0800 |
| |
pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> --- drivers/spi/spi-ti-qspi.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 366a3e5cca6b..6d24cff2693c 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -175,6 +175,7 @@ static int ti_qspi_setup(struct spi_device *spi) ret = pm_runtime_get_sync(qspi->dev); if (ret < 0) { dev_err(qspi->dev, "pm_runtime_get_sync() failed\n"); + pm_runtime_put_autosuspend(qspi->dev); return ret; } -- 2.17.1
| |