]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
spi: mxs: fix reference leak in mxs_spi_probe
authorZhang Qilong <zhangqilong3@huawei.com>
Fri, 6 Nov 2020 01:24:21 +0000 (09:24 +0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 4 Jan 2021 15:36:47 +0000 (16:36 +0100)
commit9fbb48481cb9940ff4cc598563cd37829d82b029
tree1e3293e207f341c88bd5785f24b6c24ac78b67ca
parent34f07c3c287e50cb7cdaca75e47c179fdba640fc
spi: mxs: fix reference leak in mxs_spi_probe

BugLink: https://bugs.launchpad.net/bugs/1910111
[ Upstream commit 03fc41afaa6549baa2dab7a84e1afaf5cadb5b18 ]

pm_runtime_get_sync will increment pm usage counter even it
failed. Forgetting to pm_runtime_put_noidle will result in
reference leak in mxs_spi_probe, so we should fix it.

Fixes: b7969caf41a1d ("spi: mxs: implement runtime pm")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201106012421.95420-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/spi/spi-mxs.c