Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp796553pxb; Tue, 14 Sep 2021 08:55:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSyUt5yuI9IXz83nzJHqM7VRxGUCf3bjAOJ8/E0vCE3VJ81TqehAcfTVZ6XKkw911THfWb X-Received: by 2002:a05:6602:218d:: with SMTP id b13mr14227481iob.143.1631634959546; Tue, 14 Sep 2021 08:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631634959; cv=none; d=google.com; s=arc-20160816; b=zRT2oQLIeGhRSZggNrZKCAAOgcfg8tuSrIUSK9mp25PWkPcsWXTPpwBYrU67S7zvED ggezmyBGU8AmDKJjvJeiIU0lenxhQxpCYqNUMhqgTk98RBqYcsHeaH7S6ur5b9vkHbWS haonS82dpMJuQzl9fH67c12fX4odwPSu400hEdkJ3fgx4Dc9EJ23IljnotiMZwX6wxhf jdF7OzC01NR274Daw7mpWQ40S78I5XoG5xBwOauIIGMCLjmRp34J7oZsoxwBcabbk0JI XdhdE9o+Ch5teil3LM9ZQc5eo5ZC5CadPd/c/lHq5FXKIROtR7wMG6FnkuQ29dx3yM9b qUGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=8Ml8lcBNLPAjvzuNp9VoiUtczvxLssQnWzL+/XQVVyU=; b=XB4XBFQldS6byNUe0JrAJbYV9m9n6OyyQ6ruYuT/RuYBWTMws59E5CudRBqlH1O0fp VwAk4hGGH9puCR6JosO3aYGXe9oxByfGJGbvajO0LAnsjgvi86qMfd05iDytVhKLKlhm h68MXyBzplaLp6xNv9mXE/Q0C2yyISnA9OCFF/fz1ITK9lOO2NJtgFxAfgDNCFQh0YB9 wIkgssEiMIwKl/RFYcz0TC2Hc9afdyL5nFaWbebGDlnq0hCn2/dRYHgiXfl1KYNDp+bT vKnERX4Gmrg0osvLzCq45sFnQsvba50YC3kP9pb4SQRkQ9eVckQ1cvffon+DvjgSKqLZ ac5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si3674145ilm.82.2021.09.14.08.55.42; Tue, 14 Sep 2021 08:55:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232898AbhINP4u (ORCPT + 99 others); Tue, 14 Sep 2021 11:56:50 -0400 Received: from mailgw02.mediatek.com ([216.200.240.185]:25562 "EHLO mailgw02.mediatek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232800AbhINP4u (ORCPT ); Tue, 14 Sep 2021 11:56:50 -0400 X-Greylist: delayed 306 seconds by postgrey-1.27 at vger.kernel.org; Tue, 14 Sep 2021 11:56:50 EDT X-UUID: a13246075cc945eb9b68afac2e006ecd-20210914 X-UUID: a13246075cc945eb9b68afac2e006ecd-20210914 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 320159456; Tue, 14 Sep 2021 08:50:28 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 14 Sep 2021 08:50:26 -0700 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 14 Sep 2021 23:50:25 +0800 From: To: , CC: , , , , , , , , , , , , , , , Subject: [PATCH 2/2] mt76: mt7921: fix retrying release semaphore without end Date: Tue, 14 Sep 2021 23:50:22 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sean Wang We should pass the error code to the caller immediately to avoid the possible infinite retry to release the semaphore. Fixes: 1c099ab44727 ("mt76: mt7921: add MCU support") Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang --- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c index 9b35b5da3619..db33506567dc 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c @@ -876,7 +876,7 @@ static int mt7921_load_patch(struct mt7921_dev *dev) default: ret = -EAGAIN; dev_err(dev->mt76.dev, "Failed to release patch semaphore\n"); - goto out; + break; } release_firmware(fw); -- 2.25.1