From patchwork Fri Mar 11 13:30:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiguo Li X-Patchwork-Id: 12778001 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81715C433F5 for ; Fri, 11 Mar 2022 13:38:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234420AbiCKNjG (ORCPT ); Fri, 11 Mar 2022 08:39:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235907AbiCKNjG (ORCPT ); Fri, 11 Mar 2022 08:39:06 -0500 X-Greylist: delayed 246 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 11 Mar 2022 05:38:01 PST Received: from out203-205-221-191.mail.qq.com (out203-205-221-191.mail.qq.com [203.205.221.191]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFB74131977 for ; Fri, 11 Mar 2022 05:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1647005879; bh=bTn0Ulrz1PQ04aZp3KYT1ZbdN3Em8ZHmDvX4IptqKIA=; h=From:To:Cc:Subject:Date; b=V+Lh1adWvuTCwLAymZ0iCaDIkSf7jPIn7FxNqZ1ZOYg6ZJHnuVOldqBclzB+GUo1I xoSBgZeCP/ni/aGiME2gULghw4kvLovcpPLmB82zEExLrhvfuMrkIfBIwRQ69UQYFb tW/0PYht/tK46HK3m0aAxonRocGPQ8JE1jXuMRlo= Received: from localhost.localdomain ([111.193.130.237]) by newxmesmtplogicsvrsza5.qq.com (NewEsmtp) with SMTP id 7A23AC16; Fri, 11 Mar 2022 21:30:34 +0800 X-QQ-mid: xmsmtpt1647005434trceabbcx Message-ID: X-QQ-XMAILINFO: OKKHiI6c9SH3eY2YdsC3TvfVGl3GnM3yMcgSDH/07jHGutvo3g8ZCALMEU/XMO ZjF7nrDW8jheSQjJ2w/TSCNYAmSZXCgjY963EzA/+1NRrb9oETIsW5j1++jCvJTqgCc8juDEwsXn rM76NBMNY6LTZ5v+KtEGvvMZoqS7eohHdncX9N9tekepovDmR8U3Me3aRfFs9hyJ2KQBf9LblsKL vxf7XbvCYkJ5+BqCervf8d8tLvbUg75R6N5QKqL+8tELAGT76gax7Q6xClfYC0ZxUQ2Jx8XLHRAr RUzpvSe63XELxz2IxraPIEF7Zp2djgLNWlDLMTg84K11LNcHPbkbRrafiQT9GoijATH2cCYq0mWr cqv97kxun/u5DabOM2yAG+YyVnSXt2wcxXuWxmfYBcjpUHHE6glf+k1C23sbhdlETIKW4T6yZIWJ N6wpPZDRZd3GdEMWjsXrmgJHcgbjcoTbcx2G77Nrhw2bNadF+P8ckfD34C2aPpuHDRUtVpYnttlF 9VIKR7QWjSoValqKhCuv1vZRdF4G6QZJa/R/P1HsJUGaAStmEEWl7BJTGxd4UV4QMfi+xIvcCleZ ZfrQ6HHy8e79bemxgClvnsFYlnheBBBPulP3AhILyEL4HzK/TNI1gsUZzCKhH284EJuQUbVSKokL WkLM0k2Gswjx6XO1TyMY+641RFyHNEbgAyTS5HFXtTdGyHFXAac5LPbbqtcFYpWvLnOPcgnmHRu2 cPxG/FZzRwVqg93+elPoi7aZKvp9FrOWD7l6Oer4LsZiNJrOikq1qc4jsKZE6u7C6QA6b7vec+fQ McGwJh3g6q9MgVBIFgrIJJiZ7zHQ7aoHxR2/uQrqJ5Oxq5Je/UQWbFNM2uCO1j3juw1W1FQGqlmO C1LyzjaROuAov8uu90PdZHqc328OXEWg== From: Weiguo Li To: igor.mitsyanko.os@quantenna.com Cc: kvalo@codeaurora.org, geomatsi@gmail.com, linux-wireless@vger.kernel.org Subject: [PATCH] qtnfmac: fix null check Date: Fri, 11 Mar 2022 21:30:33 +0800 X-OQ-MSGID: <20220311133033.258241-1-liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org We did a null check after "mac_info->if_comb = kcalloc(...)", but we checked "mac->macinfo.if_comb" instead of "mac_info->if_comb". Signed-off-by: Weiguo Li --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index c68563c83098..e4271405b997 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -1256,7 +1256,7 @@ qtnf_cmd_resp_proc_mac_info(struct qtnf_wmac *mac, sizeof(*mac->macinfo.if_comb), GFP_KERNEL); - if (!mac->macinfo.if_comb) + if (!mac_info->if_comb) return -ENOMEM; return 0;