This is a note to let you know that I've just added the patch titled spi: imx: fix reference leak in two imx operations to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: spi-imx-fix-reference-leak-in-two-imx-operations.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 1dcbdd944824369d4569959f8130336fe6fe5f39 Mon Sep 17 00:00:00 2001 From: Zhang Qilong <zhangqilong3@xxxxxxxxxx> Date: Mon, 2 Nov 2020 22:58:35 +0800 Subject: spi: imx: fix reference leak in two imx operations From: Zhang Qilong <zhangqilong3@xxxxxxxxxx> commit 1dcbdd944824369d4569959f8130336fe6fe5f39 upstream. pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in callers(spi_imx_prepare_message and spi_imx_remove), so we should fix it. Fixes: 525c9e5a32bd7 ("spi: imx: enable runtime pm support") Signed-off-by: Zhang Qilong <zhangqilong3@xxxxxxxxxx> Link: https://lore.kernel.org/r/20201102145835.4765-1-zhangqilong3@xxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/spi/spi-imx.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -1538,6 +1538,7 @@ spi_imx_prepare_message(struct spi_maste ret = pm_runtime_resume_and_get(spi_imx->dev); if (ret < 0) { + pm_runtime_put_noidle(spi_imx->dev); dev_err(spi_imx->dev, "failed to enable clock\n"); return ret; } Patches currently in stable-queue which might be from zhangqilong3@xxxxxxxxxx are queue-5.4/spi-imx-fix-reference-leak-in-two-imx-operations.patch