From patchwork Sun Nov 13 15:42:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 19372 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1729397wru; Sun, 13 Nov 2022 07:43:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf67fTeHMPn0H9cW4gwlCOU3rIrFwvovHyBODNn/1NVSPa2YwUHEPTvPP/Nr8jXrmpXxtzvO X-Received: by 2002:a17:907:d402:b0:7aa:493b:679 with SMTP id vi2-20020a170907d40200b007aa493b0679mr8066112ejc.320.1668354233431; Sun, 13 Nov 2022 07:43:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668354233; cv=none; d=google.com; s=arc-20160816; b=BD1Wbr8Z+cFhAia2KpFRuc/14gbdafzil7FBv+UzoLML/5wPXlK3ZpfCrjz/3AqdqX BGcXT/gHI8uGxPZzsMVpPRjICch2laSr5GoA2dVoMRHp2AZVnSh+YslqflOfUJeKxqTu BPP9pBF+I/V8sCZ0hBVEwBolHqfN1AXie7hz21lnRSIC59+DrCBgW+YwXBIb8q+28Xvt WmAd3qu79Zk32IWMfz8yO+LIKiBl//2ZrOLpRDV5Dlunl3WZ+Ml6ugmCXNV3N6r3MUQF 3xkFRK8oBM9SULxpW0xsIwZICbFyzIUSRCvPCSebolT/ODqkjzMl/EF4Pf0Z38Qq88Xb 0nkA== 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=Bu0H5gkYvkV/LvTo4nBOl3ClU32lE9RD4Mg6NJBqfXnt/udEWvHylsq2u9OzSaG6bG tZCZgm0i/qc0E+JWWldW1n3hVNv91V4+1qaZyCRyJs7hqtS49H8zVd5o18gWxYZYtSZD mYVhxSqIH0wwMkr3eGDWyvAjvAP8fFzzdPi0qHdnUcS1J9lJYIqu5FkWXM8tIX7klOrr FkZ66A6YSQRtWF5prEIawI8xKEkPwpzidT9GSX6/j9tQ4pqqDzYtSCP4bnXiMdgPlSlA oCsjRn5wqlgFYtgDKOqBudzyxuGg0PyBROt/+P0DL24FL+OIPdcCDFKovYohm+CWo+4B 8GTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a056402500d00b0045a11b60c57si7362010eda.121.2022.11.13.07.43.28; Sun, 13 Nov 2022 07:43:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231252AbiKMPmh (ORCPT + 99 others); Sun, 13 Nov 2022 10:42:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235085AbiKMPmf (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 482B27675 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 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=unavailable 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749396208628112142?= X-GMAIL-MSGID: =?utf-8?q?1749396208628112142?= '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 --- 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;