Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4525799rwb; Sun, 13 Nov 2022 07:43:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf7gADDhRIsiISX3K6Dcw/yGKfQwR2Zc2dXykJogM6OP1T1tYJW5XWmQduKwFJwSR4dXsVjp X-Received: by 2002:a17:907:1749:b0:78d:4f05:6ba7 with SMTP id lf9-20020a170907174900b0078d4f056ba7mr7836531ejc.590.1668354230634; Sun, 13 Nov 2022 07:43:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668354230; cv=none; d=google.com; s=arc-20160816; b=o8Nf6NKBsvFwgtl8Q5uzO60g93q/BB/KcWfanKM9x7K1cFZIvnWSDlGHJeM3ZHamDJ p4ewwat3ZhOaZbkJLFTMFjwC4HMnr6x9vJbQpCPHWTdRbCSPBs66vlHwHOY/CqIkLmVl ebc6OaZoQXbdwft8osgg85iRJU/4mOK0V6Wv6ahJ7lVC/+tsePycU1x/DR7DsAsqaOFf vxkViXZ8mQvii3ATH4tXu0g59N3OpgxHPth/m63VLJnYft1JKTfyTDNsBucqkXK+f66F NCO4uBEOokav+IikCD5GZcEHPJQjfcAF98sG2t0fkXU9Hbua1tDKWnV4cC7O2WyNBqrs syEA== 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=M+2r2uYqhh/qrcF+33i2EoQv547icUqeMmuNO8k1dTY=; b=nFp1n3jbTnX5/Qy1urEZbtjfPNKkF31qT8yvYVFLZOpPAZY8CfLolFfJmevnSYLV/a q/HzwmtqiblvS+QzrZo4EyZg6j+PsDVLd1xSjD3KATJidr6Se1Lu+FmgulARgZUDpCYr 485Lea1snuJ1nEm9nqI3I6Wx1tgQMjC4znRLHkdtHUlM/soeGaoVq3pIjMWBRSCMfeD2 iPVUR4HWXaehtHOtCo3/lbWSHW94f/pOgnacSC1Hi8NcN6ov7UEIrz/y+XtxzxijqlEi SA4nf1WKk3Ohxv7ZnhaeUSL9YKmM+DjfxODAkl8hiN/nXdtY7OUv0qskseALdVOYkKuT CBDg== 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 sc11-20020a1709078a0b00b0078d96d3278csi4404983ejc.510.2022.11.13.07.43.27; Sun, 13 Nov 2022 07:43:50 -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 S235156AbiKMPmg (ORCPT + 66 others); Sun, 13 Nov 2022 10:42:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235014AbiKMPmf (ORCPT ); Sun, 13 Nov 2022 10:42:35 -0500 Received: from smtp.smtpout.orange.fr (smtp-12.smtpout.orange.fr [80.12.242.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 318BA10D4 for ; Sun, 13 Nov 2022 07:42:33 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id uF7so4X3g9RnzuF7sou3uq; Sun, 13 Nov 2022 16:42:32 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 13 Nov 2022 16:42:32 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Ping-Ke Shih , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Chin-Yen Lee 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() Date: Sun, 13 Nov 2022 16:42:21 +0100 Message-Id: <32320176eeff1c635baeea25ef0e87d116859e65.1668354083.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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 '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 --- 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