]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
usb: xhci-mtk: fix leakage of shared hcd when fail to set wakeup irq
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Mon, 28 Nov 2022 06:33:37 +0000 (14:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Nov 2022 07:56:09 +0000 (08:56 +0100)
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: 04284eb74e0c ("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>
drivers/usb/host/xhci-mtk.c

index cff3c4aea0362a364a0f459a87aa47ae745c8842..f7cbb08fc5068da5f932885c138781b7e88c1bc0 100644 (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);