Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp520810rwl; Tue, 11 Apr 2023 23:35:59 -0700 (PDT) X-Google-Smtp-Source: AKy350ZZf6DGwJOy3Usau0oJogumIjNy5nh5wxiIeWLl42ThLreskkB43wzExFXnH4mHpfrUjQ9G X-Received: by 2002:a62:3803:0:b0:623:8592:75c4 with SMTP id f3-20020a623803000000b00623859275c4mr5431634pfa.29.1681281359167; Tue, 11 Apr 2023 23:35:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681281359; cv=none; d=google.com; s=arc-20160816; b=QrCPQVuD034YRfCLnTEEJDLMn/YMAfuR+/8PZLfp8BKl6iP6p4O6mJl64SzM18Hv+5 HZQDzUawveleLX6mMkGKjdhCb3C3S9NcK1YVDgExHQmQt3ip25n4JY/lbkIHeKD3+e3x vRVKhWe//MGq/g4Rc/rz/BppOZGoT8lJo8IAkoNhookFQ4znsitadWx6pdYhHnTRpuT/ GgaocQzcsrp3GWKLQV6eBOO/XqWWlG/eSVjQ6CvS5EFlFYLNc7Eq+U42KJFRk4/R2k9X GimchHUxq2w16QuL21v2mnb+YqIXhIdhjTTLAfrBoNAaiQTEXGOE4/gVUlX+q9CFMVn7 Y1Lg== 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 :message-id:date:subject:cc:to:from; bh=pAW2mTr1xSgU+sQfj1rZtp8QmblDIZAu9FC32yQc2aI=; b=aoVTMJfEJx29SMH0RpHqB2DdwFgZYAglMi9ZMPIzaIxrttNFHech8WTP3e++M+EIxt 0Qgp8sGTQIkdtZAwoPOtKX/z/T79nR8SMm+WiMdPCDQdfzWt2JJY6BnJqUFMGGRbZ7qV clKwALwQ/FH9aAgnWMfj48Zt3gt42avxwtv4tl6FbW+YDPHIxyv3P4OzEaPhXGNUAnpm 0JBmmV0g1RfnZaERWt4cnbx2JH7UQMWc4j3NWG/t+zqnsLjVMfisaE0LFsoycF4yr3bd CxvV/x3ReYY9YMps9La49Fv1AgD6rQOGhRc1qpcvsBd9REf1Bn9uM+prUlJhqvzE4oSL 4Fug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020aa79f46000000b00637ab953799si7365237pfr.168.2023.04.11.23.35.47; Tue, 11 Apr 2023 23:35:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229710AbjDLGZi (ORCPT + 61 others); Wed, 12 Apr 2023 02:25:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbjDLGZf (ORCPT ); Wed, 12 Apr 2023 02:25:35 -0400 Received: from hust.edu.cn (unknown [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D0705253; Tue, 11 Apr 2023 23:25:31 -0700 (PDT) Received: from C512-C06.localdomain ([10.12.190.72]) (user=jiefeng_li@hust.edu.cn mech=LOGIN bits=0) by mx1.hust.edu.cn with ESMTP id 33C6MidG003133-33C6MidH003133 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 12 Apr 2023 14:22:48 +0800 From: Jiefeng Li To: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno Cc: Jiefeng Li , Dongliang Mu , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH] wifi: mt76: mt7921: fix missing unwind goto in `mt7921u_probe` Date: Wed, 12 Apr 2023 14:22:34 +0800 Message-Id: <20230412062234.4810-1-jiefeng_li@hust.edu.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-FEAS-AUTH-USER: jiefeng_li@hust.edu.cn X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org `mt7921u_dma_init` can only return zero or negative number according to its definition. When it returns non-zero number, there exists an error and this function should handle this error rather than return directly. Fixes: 0d2afe09fad5 ("mt76: mt7921: add mt7921u driver") Signed-off-by: Jiefeng Li Reviewed-by: Dongliang Mu --- The issue is discovered by static analysis, and the patch is not tested yet. --- drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c index 8fef09ed29c9..70c9bbdbf60e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c @@ -272,7 +272,7 @@ static int mt7921u_probe(struct usb_interface *usb_intf, ret = mt7921u_dma_init(dev, false); if (ret) - return ret; + goto error; hw = mt76_hw(dev); /* check hw sg support in order to enable AMSDU */ -- 2.34.1