Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6239350rwb; Mon, 14 Nov 2022 16:59:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf7TxACKvotQ/IC2N4KiiPx60MlDbLRsc0zrVQWHdmGtSbQ1roYmINQlk3WcW15C1oam7T9B X-Received: by 2002:a63:1c09:0:b0:42a:9ba8:8c6b with SMTP id c9-20020a631c09000000b0042a9ba88c6bmr13848985pgc.407.1668473982806; Mon, 14 Nov 2022 16:59:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668473982; cv=none; d=google.com; s=arc-20160816; b=0f2JG2qa/3hgMtr65wNlcIuMrpnzh32eUUtCXNj2wwTVGT64WoRA2X+cru1oZ4UhDa dm1/OWohcxNgI4Zx1A+wOF0qfHWK7ZKMOzI4sdOnZYshzXyldMdHQETSZx4MGGL9AqsA Zua6FrA4AAmN0IG1wC0hkeEcdYtPH4wdOz2MguTaEvlomInqplaNpZ1aPgD06PwisTgy AC9z9v5IbGxNZu5GTDjVEurV3wYoKtzwTLP7YXmy9Rk5Uy6dhoDw4Py1rF3jSxFzj0DQ tSnA1oU8ODeWw9pXV7t3PICryFdf2syASt/N5M4vVeJKBoaw09X21LuRhtDg0R1tG5kz Yenw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=R1gjeUxfJkJogwYdDIqK0MjO7ZNtcSUNWI/zf6p8g/k=; b=aQhpXzOhln+H8tvWYpT6XY38jvpfSQUeZd2WVV3G0DQ39Qy7+TvJo7CNYUaeucCJum uTdltNEwQaZ3S7T9K4nAexKGp9QZV/v6yxLPWZV6DSzQaOOKeoMyreWyAEeXHVww+o57 MUqKVF8BrqGloZYNCaImi/NMmjW2uGeIMGWidlUNEyAmKZS40ik7K2+Szao5gfJLd74E 1r8q6rBwHu5GkJudTWksirioTGOQiPvQAAnMh+21l1xanHtJYx6ZkysFvTKnYlkl/Trq XMX7hhXmi1NjXW6iU/XyzqGRVtvEa4gOSiwQ8mJYvSgMSmuz6NS14OYusecpjmLHtkAk 3/eA== 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 ja22-20020a170902efd600b001786a4a4c98si9742800plb.371.2022.11.14.16.59.30; Mon, 14 Nov 2022 16:59:42 -0800 (PST) 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 S233300AbiKOAb7 convert rfc822-to-8bit (ORCPT + 66 others); Mon, 14 Nov 2022 19:31:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbiKOAb6 (ORCPT ); Mon, 14 Nov 2022 19:31:58 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 52387D2D9; Mon, 14 Nov 2022 16:31:57 -0800 (PST) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 2AF0UxnS6016872, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 2AF0UxnS6016872 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Tue, 15 Nov 2022 08:30:59 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Tue, 15 Nov 2022 08:31:39 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 15 Nov 2022 08:31:39 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::15b5:fc4b:72f3:424b]) by RTEXMBS04.realtek.com.tw ([fe80::15b5:fc4b:72f3:424b%5]) with mapi id 15.01.2375.007; Tue, 15 Nov 2022 08:31:38 +0800 From: Ping-Ke Shih To: Christophe JAILLET , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Timlee CC: "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" Subject: RE: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable() Thread-Topic: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable() Thread-Index: AQHY93aSGfNpN1UcU0efciL+7dUV5q4/JDqg Date: Tue, 15 Nov 2022 00:31:38 +0000 Message-ID: <3e97dad2b634434abf266a17030df464@realtek.com> References: <32320176eeff1c635baeea25ef0e87d116859e65.1668354083.git.christophe.jaillet@wanadoo.fr> In-Reply-To: <32320176eeff1c635baeea25ef0e87d116859e65.1668354083.git.christophe.jaillet@wanadoo.fr> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXMBS02.realtek.com.tw, 9 x-kse-attachmentfiltering-interceptor-info: no applicable attachment filtering rules found x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?us-ascii?Q?Clean,_bases:_2022/11/14_=3F=3F_10:23:00?= x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, 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 > -----Original Message----- > From: Christophe JAILLET > Sent: Sunday, November 13, 2022 11:42 PM > To: Ping-Ke Shih ; Kalle Valo ; David S. Miller ; > Eric Dumazet ; Jakub Kicinski ; Paolo Abeni ; > Timlee > Cc: linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Christophe JAILLET > ; linux-wireless@vger.kernel.org; netdev@vger.kernel.org > Subject: [PATCH] wifi: rtw89: Fix some error handling path in rtw89_wow_enable() > > 'ret' is not updated after several function calls in rtw89_wow_enable(). > This prevent error handling from working. > > Add the missing assignments. > > Fixes: 19e28c7fcc74 ("wifi: rtw89: add WoWLAN function support") > Signed-off-by: Christophe JAILLET Acked-by: Ping-Ke Shih Thanks for the fixes. > --- > drivers/net/wireless/realtek/rtw89/wow.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c > index 7de4dd047d6b..b2b826b2e09a 100644 > --- a/drivers/net/wireless/realtek/rtw89/wow.c > +++ b/drivers/net/wireless/realtek/rtw89/wow.c > @@ -744,13 +744,13 @@ static int rtw89_wow_enable(struct rtw89_dev *rtwdev) > goto out; > } > > - rtw89_wow_swap_fw(rtwdev, true); > + ret = rtw89_wow_swap_fw(rtwdev, true); > if (ret) { > rtw89_err(rtwdev, "wow: failed to swap to wow fw\n"); > goto out; > } > > - rtw89_wow_fw_start(rtwdev); > + ret = rtw89_wow_fw_start(rtwdev); > if (ret) { > rtw89_err(rtwdev, "wow: failed to let wow fw start\n"); > goto out; > @@ -758,7 +758,7 @@ static int rtw89_wow_enable(struct rtw89_dev *rtwdev) > > rtw89_wow_enter_lps(rtwdev); > > - rtw89_wow_enable_trx_post(rtwdev); > + ret = rtw89_wow_enable_trx_post(rtwdev); > if (ret) { > rtw89_err(rtwdev, "wow: failed to enable trx_post\n"); > goto out; > -- > 2.34.1