2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 18:23:53 +08:00

usb: xhci-mtk: fix leakage of shared hcd when fail to set wakeup irq

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: 04284eb74e ("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>
This commit is contained in:
Chunfeng Yun 2022-11-28 14:33:37 +08:00 committed by Greg Kroah-Hartman
parent 27ef178497
commit 03a88b0baf

View File

@ -646,7 +646,6 @@ static int xhci_mtk_probe(struct platform_device *pdev)
dealloc_usb3_hcd:
usb_remove_hcd(xhci->shared_hcd);
xhci->shared_hcd = NULL;
put_usb3_hcd:
usb_put_hcd(xhci->shared_hcd);