mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
UPSTREAM: usb: xhci-mtk: break loop when find the endpoint to drop
No need to check the following endpoints after finding the endpoint wanted to drop. Fixes:54f6a8af37("usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints") Cc: stable <stable@vger.kernel.org> Reported-by: Ikjoon Jang <ikjn@chromium.org> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1612255104-5363-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commita50ea34d6dhttps://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I6c6ca12fc0d7dcd1eabe73e4b1bdecedddbc7d46
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9c4825083b
commit
8dac114dab
@@ -689,8 +689,10 @@ void xhci_mtk_drop_ep_quirk(struct usb_hcd *hcd, struct usb_device *udev,
|
||||
sch_bw = &sch_array[bw_index];
|
||||
|
||||
list_for_each_entry_safe(sch_ep, tmp, &sch_bw->bw_ep_list, endpoint) {
|
||||
if (sch_ep->ep == ep)
|
||||
if (sch_ep->ep == ep) {
|
||||
destroy_sch_ep(udev, sch_bw, sch_ep);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_mtk_drop_ep_quirk);
|
||||
|
||||
Reference in New Issue
Block a user