Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4177209pxb; Mon, 8 Feb 2021 09:41:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbdsyeEwpebXyUUjsf8nGWZgW/J6yhM5pQbxBGKZmY7QQ3P0XObVtLkHevqoub6Fx5HMpi X-Received: by 2002:aa7:d60f:: with SMTP id c15mr18359827edr.291.1612806087831; Mon, 08 Feb 2021 09:41:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612806087; cv=none; d=google.com; s=arc-20160816; b=sRo5sJg75Lr8VY4orgzKVSNpSZyQ7KzwuSKxwKEshLY9/N9AZtO1DaE6jhKhbRdrPC Bbpa4QhbOPMiHfaUiNa8scK7JALpk2cvUZSlSLfX/ahk0DmUBX/TScEHqGN28Ff+5cMi yJ0/C7fg1bl157bA2VtmoMmwm51BMZgZP8QCRnqGpjSSiILgnY0HGTAqHuQBsUM0Xp8m pcKzkJlor2R0AWMhoxzgZ7q8nNMak9vtR63v+hb7T2Q+fo6EtVdcPPjSEe3Is95eLit+ y2aUNOOcverc9ZTNiQ+hznT8iDbbPCACdrrLfHwIAm8PQTiZfq21hPvzaZcNkkppik5V KmPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yr5R/cDG0QuWOUV/zdvtyAdTYo318G0hYWm7DOK5FF8=; b=ghVzjlx2oOt5GEsION2DHv6qpOIqNUeBec6muJiNR4t+83253M/SmPtxvQtj3RNOc5 2adW57JR5ZzqErwUplu16z+gtNAj0dXzI8HBIT9yGiMgQPx6jfomljwbVqjy+YhbVqws WbYHu8awyyvRlmMUlDsTQA+qOv2ASmk2UrtPnsQ3kZFX+OyUyReRO2fVnM+/xnML+QTq uZyBmxlYTDRfsKpoLnrCt6IzGaL0pYj45n8pNhRX6IwNvjtvg/Te3cixcwvGWlHx56Fh rc8ohdOuiBNVYJka20IIL7FJZLZGPc/l8i9BNkgsif2IcYjMSa8yesn8j620mlC1+COc dPDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jx3Qp0Kk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 33si11001274edq.187.2021.02.08.09.41.03; Mon, 08 Feb 2021 09:41:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jx3Qp0Kk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234984AbhBHRiD (ORCPT + 99 others); Mon, 8 Feb 2021 12:38:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:33694 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232733AbhBHPSr (ORCPT ); Mon, 8 Feb 2021 10:18:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2225164EE3; Mon, 8 Feb 2021 15:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797158; bh=RzePf7hV+LpCF+q3I5E782D4lSKVs5lWAKS6C+yPs2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jx3Qp0KkFfyPnoShf1AmarHN69Uha4X6OCtvhHcnDE2FgCz+DCB8MymOs9BN4TRfZ WccL4yyElBTYA6xxkzsszwQWfTFZinzojOiPCGL32+Ez+gqJhPRzk5XwWZ60fkdjWO uMeErnmkOi1juu0PsCrlVT+hbYT4qNe7PE+IEbKs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ikjoon Jang , Chunfeng Yun Subject: [PATCH 5.10 013/120] usb: xhci-mtk: break loop when find the endpoint to drop Date: Mon, 8 Feb 2021 16:00:00 +0100 Message-Id: <20210208145818.923818030@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145818.395353822@linuxfoundation.org> References: <20210208145818.395353822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chunfeng Yun commit a50ea34d6dd00a12c9cd29cf7b0fa72816bffbcb upstream. No need to check the following endpoints after finding the endpoint wanted to drop. Fixes: 54f6a8af3722 ("usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints") Cc: stable Reported-by: Ikjoon Jang Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1612255104-5363-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-mtk-sch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c @@ -689,8 +689,10 @@ void xhci_mtk_drop_ep_quirk(struct usb_h 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);