mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
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>
This commit is contained in:
parent
a57c75ff07
commit
6bc48348ec
1 changed files with 2 additions and 1 deletions
|
|
@ -4317,10 +4317,11 @@ static int rtl8152_close(struct net_device *netdev)
|
|||
tp->rtl_ops.down(tp);
|
||||
|
||||
mutex_unlock(&tp->control);
|
||||
|
||||
usb_autopm_put_interface(tp->intf);
|
||||
}
|
||||
|
||||
if (!res)
|
||||
usb_autopm_put_interface(tp->intf);
|
||||
|
||||
free_all_mem(tp);
|
||||
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Reference in a new issue