From: Chunfeng Yun Date: Thu, 9 Dec 2021 02:54:22 +0000 (+0800) Subject: usb: xhci-mtk: fix list_del warning when enable list debug X-Git-Tag: accepted/tizen/unified/20230118.172025~4113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67cbcd3fb8e6412cc5220315c7266e52c2b66268;p=platform%2Fkernel%2Flinux-rpi.git usb: xhci-mtk: fix list_del warning when enable list debug commit ccc14c6cfd346e85c3ecb970975afd5132763437 upstream. There is warning of 'list_del corruption' when enable list debug (CONFIG_DEBUG_LIST=y), fix it by using list_del_init() Fixes: 4ce186665e7c ("usb: xhci-mtk: Do not use xhci's virt_dev in drop_endpoint") Cc: stable Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20211209025422.17108-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c index 134f478..b4c84b3 100644 --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -781,7 +781,7 @@ int xhci_mtk_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) ret = xhci_check_bandwidth(hcd, udev); if (!ret) - INIT_LIST_HEAD(&mtk->bw_ep_chk_list); + list_del_init(&mtk->bw_ep_chk_list); return ret; }