Skip to content

Commit

Permalink
usb: xhci-mtk: fix leakage of shared hcd when fail to set wakeup irq
Browse files Browse the repository at this point in the history
commit 03a88b0 upstream.

Can not set the @shared_hcd to NULL before decrease the usage count
by usb_put_hcd(), this will cause the shared hcd not released.

Fixes: 04284eb ("usb: xhci-mtk: add support runtime PM")
Cc: <stable@vger.kernel.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20221128063337.18124-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Chunfeng Yun authored and gregkh committed Dec 31, 2022
1 parent dfbbc47 commit c8e7463
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/usb/host/xhci-mtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ static int xhci_mtk_probe(struct platform_device *pdev)

dealloc_usb3_hcd:
usb_remove_hcd(xhci->shared_hcd);
xhci->shared_hcd = NULL;

dealloc_usb2_hcd:
usb_remove_hcd(hcd);
Expand Down

0 comments on commit c8e7463

Please sign in to comment.