From patchwork Mon Oct 25 11:44:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1545705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=mapJ8IMH; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HdCyP4jZ1z9sXS for ; Mon, 25 Oct 2021 22:53:16 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1meyXI-0005h1-Li; Mon, 25 Oct 2021 11:53:04 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1meyP8-00059z-C7 for kernel-team@lists.ubuntu.com; Mon, 25 Oct 2021 11:44:38 +0000 Received: from HP-EliteBook-840-G7.. (1-171-210-154.dynamic-ip.hinet.net [1.171.210.154]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 5B36C41983 for ; Mon, 25 Oct 2021 11:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1635162278; bh=n2DOSOnGL7DMDHW/fcnBlEPEN/zb7ZpQgsorlIFRRNk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mapJ8IMHH8tuu5ESh/WCAsGkfn03tR6mu2zvOlhHL+DXA1pp4QM3oBYoztAGzz7HE 2Qxpw8heSIGTgtme9w7kPnT4T2HmsFYCDFjdcBhv+CezOCVUklkrGLcUkHCvgrrtOW WW1ovlbjIfMpDIXifQep8QVdHev8YViL/dfmGSVjS2W/p7tKWh/9FbaOPyYz1/9a2h i66H1a5J/OZkye86DwERuuygF6DBVbv73Ni5t5RZLKi4xcpJZXpJmPDgpfqVk01LAv YPa1TLIimKHYDTaOie3jp8mm27MJgGtqr/6ho9Mbz2PzqFNr+vCvRFDdqnaSC79NiW VbSLGLaAXlyQg== From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [I/Unstable/OEM-5.10/OEM-5.13/OEM-5.14] [PATCH v2 3/5] rtw89: fix return value check in rtw89_cam_send_sec_key_cmd() Date: Mon, 25 Oct 2021 19:44:11 +0800 Message-Id: <20211025114414.1334615-5-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211025114414.1334615-1-kai.heng.feng@canonical.com> References: <20211025114414.1334615-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Yang Yingliang BugLink: https://bugs.launchpad.net/bugs/1945967 Fix the return value check which testing the wrong variable in rtw89_cam_send_sec_key_cmd(). Reported-by: Hulk Robot Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Signed-off-by: Yang Yingliang Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20211018033102.1813058-1-yangyingliang@huawei.com (cherry picked from commit a04310edcd00d6014126483a2d8cd95b4786db25 linux-next) Signed-off-by: Kai-Heng Feng --- drivers/net/wireless/realtek/rtw89/cam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw89/cam.c b/drivers/net/wireless/realtek/rtw89/cam.c index c1e8c76c6acaf..ad7a8155dbed3 100644 --- a/drivers/net/wireless/realtek/rtw89/cam.c +++ b/drivers/net/wireless/realtek/rtw89/cam.c @@ -77,7 +77,7 @@ static int rtw89_cam_send_sec_key_cmd(struct rtw89_dev *rtwdev, return 0; ext_skb = rtw89_cam_get_sec_key_cmd(rtwdev, sec_cam, true); - if (!skb) { + if (!ext_skb) { rtw89_err(rtwdev, "failed to get ext sec key command\n"); return -ENOMEM; }