Skip to content

Commit 6bc4834

Browse files
tiwaigregkh
authored andcommitted
r8152: Fix potential PM refcount imbalance
[ Upstream commit 9c23aa5 ] 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 <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent a57c75f commit 6bc4834

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/usb/r8152.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4317,9 +4317,10 @@ static int rtl8152_close(struct net_device *netdev)
43174317
tp->rtl_ops.down(tp);
43184318

43194319
mutex_unlock(&tp->control);
4320+
}
43204321

4322+
if (!res)
43214323
usb_autopm_put_interface(tp->intf);
4322-
}
43234324

43244325
free_all_mem(tp);
43254326

0 commit comments

Comments
 (0)