Commit 44ee9eef authored by Jindong Yue's avatar Jindong Yue Committed by Treehugger Robot
Browse files

ANDROID: usb: xhci-plat: Fix double-free in xhci_plat_remove



Remove the duplicate usb_put_hcd(shared_hcd) to fix following
warning when unplugging the usb mouse.

 ------------[ cut here ]------------
 refcount_t: underflow; use-after-free.
 WARNING: CPU: 4 PID: 153 at lib/refcount.c:28 refcount_warn_saturate+0xf8/0x138
 Call trace:
  refcount_warn_saturate+0xf8/0x138
  usb_put_hcd+0xbc/0xc4
  xhci_plat_remove+0x124/0x1e4
  platform_remove+0x40/0x78

Bug: 290507071
Fixes: 90ab8e7f ("ANDROID: usb: host: add xhci hooks for USB offload")
Change-Id: Id840b6dcb69600658557c7a33e59c318f66160f5
Signed-off-by: default avatarJindong Yue <jindong.yue@nxp.com>
parent 55679fd0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment