r8152: Fix potential PM refcount imbalance
authorTakashi Iwai <tiwai@suse.de>
Wed, 14 Jul 2021 17:00:21 +0000 (19:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Aug 2021 06:38:53 +0000 (08:38 +0200)
commita5b9b064d3b0d737103539f1fabbba513ab49c66
treed2e273831501d3e5ffc7c4da2e85a37ac87f4630
parentae7522bf0e8da7b8a763a0d76c508ca32962114c
r8152: Fix potential PM refcount imbalance

[ Upstream commit 9c23aa51477a37f8b56c3c40192248db0663c196 ]

rtl8152_close() takes the refcount via usb_autopm_get_interface() but
it doesn't release when RTL8152_UNPLUG test hits.  This may lead to
the imbalance of PM refcount.  This patch addresses it.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1186194
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/r8152.c