This is a note to let you know that I've just added the patch titled ALSA: ac97: fix PM reference leak in ac97_bus_remove() to the 4.19-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: alsa-ac97-fix-pm-reference-leak-in-ac97_bus_remove.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 4bc8154b94156988adee5c20697bb3ae0a73a6d2 Author: Yufen Yu <yuyufen@xxxxxxxxxx> Date: Mon May 24 05:38:11 2021 -0400 ALSA: ac97: fix PM reference leak in ac97_bus_remove() [ Upstream commit a38e93302ee25b2ca6f4ee76c6c974cf3637985e ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Signed-off-by: Yufen Yu <yuyufen@xxxxxxxxxx> Link: https://lore.kernel.org/r/20210524093811.612302-1-yuyufen@xxxxxxxxxx Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index ca50ff444796..d8b227e6d4cf 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -523,7 +523,7 @@ static int ac97_bus_remove(struct device *dev) struct ac97_codec_driver *adrv = to_ac97_driver(dev->driver); int ret; - ret = pm_runtime_get_sync(dev); + ret = pm_runtime_resume_and_get(dev); if (ret < 0) return ret;