Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2594870pxf; Sun, 4 Apr 2021 07:12:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5vTztz/V72/unzSP7AaxITsuc8+tF7A8p4HMB2olZqTr3HBbtXw3AMbgoHAxLuazMnPPo X-Received: by 2002:a17:906:d9ca:: with SMTP id qk10mr5362477ejb.436.1617545525983; Sun, 04 Apr 2021 07:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617545525; cv=none; d=google.com; s=arc-20160816; b=rFGs9efrEoTrQR5RfyGxG531DYpmq9Iktq8gEDJZLqFRwlMx2J9GecoZy9Aq4DjWfN Qm38cLFbJyq/KzfZPNZ42sfGj+uDp/8UPfKkV7BVxE2sVs+PYsOm0ctk+vreUgZaKTBG VvgkBBoPKJ3+2sT8fxXJ2w/Tvsyu7hf6Jjjhq0xbaNEptGlA0F+WSn6toRsYmTv13M5N EPX2Mg6toWO+6BeioLYUnVYVpGS9BGUxfIDQ31WLK4jNXrZm6Xjij5XRi0ZMhfn3O8GI NUpCX0E3LEmpm2Lqjhk6uJbJn2V3T72z86kxPJ6o3uyMGjs9zAdhXNwqewdkLRQY2IX3 pJZQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fwdqSVIbe15EmqulmndVdLGM1V+ZcYJqDXqI1hmDV28=; b=Qh1rtLFWpeEMdPzRY9OUSWpC5CGOV4hnRU0Eq4PcmSZuC2+/ii6TMzxa2Fus6iMQJj Di6tCJC4sMYKu28Xge3GYPBm/Ks7bcof21Qho8DEl7UGteL488GGLeorIiT5myqL+zuv OZGNxM0iJzJV8lub6hUq6FcgzIxh3IA4Vb56a5oXDcWB00VJnHI1y0jQb0zrV7jny9VE d5jMtyFsbfWigXhJVBvPTBFF7QbyVFgg/2FsjGFH4kzPqTkjTxLh0c4LYaE8B+DeWqmV slhJ7WNkV27Uxc+zsKVMgRDfVKjkQq8SjAV92KZde81uhjJ5MpQSb3nz5A5maP2FhTEp MP5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VBer9f3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i26si13124595edb.84.2021.04.04.07.11.44; Sun, 04 Apr 2021 07:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VBer9f3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbhDDOKj (ORCPT + 99 others); Sun, 4 Apr 2021 10:10:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231222AbhDDOKQ (ORCPT ); Sun, 4 Apr 2021 10:10:16 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DD96C061794 for ; Sun, 4 Apr 2021 07:10:11 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5-20020a05600c0245b029011a8273f85eso344268wmj.1 for ; Sun, 04 Apr 2021 07:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fwdqSVIbe15EmqulmndVdLGM1V+ZcYJqDXqI1hmDV28=; b=VBer9f3DAOxB1cCPffZZLO2RR3/J0z3qlkX43eJRedsZ6IrEH3y7gUYjVZ8wVi3Oj7 EZ6JTqhBbi54cr+hgBDo8E1ewiDTUdZKMI/K+w4xVxowXXPFUdcuTXXX0AejKrSqbWdT FeVULcbxNuAL1HrsdPUKW3ttgyfA3qAEj3WLGmKHSR29ZH6HWID6t7nBDfIQV77pEKwB qN9I2HGHI2Pqiye6MFpGp5MynKHpcGiJc32YWtnrHsz6lHGVgxg9Wd0PzTbNcobPFNud Gtplx+8tkaSU0BpSezhUVkcAS2Mg/QbaggDuP4MzisWy67LKMM7eDOImRFhmv4QUlWCp ieAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fwdqSVIbe15EmqulmndVdLGM1V+ZcYJqDXqI1hmDV28=; b=fwTtLE2nLwpQCx7udW4UucX1mP/lg1fHZlWRsW1LCqL9bvrbqdlmFDDtJu/8RXnxvN CjU2tx2Tze/HKPplUAbRTFC7/naOjUnQGQ3PKFYfFrdfEgFJ9VOdzhKwp9Xb8QeiHmgu pQrtATPAh2L60X/Y/JBs1aWw2HBE1jy3xKvHN43TBSE5trBIpio2zk+elXWbwu7eKxh6 J7ZKLOcf/f/1nNOkrdupCktSkUjSaO32hRuJuGXMm2iMd4SmmpR1pQjy7c8Zsz/wXm+G w5zF/Vkafh7aeiAOtkO0w17F06Rv/V4RNmdCDkOSd2lad7rWWhm3vkFGmI11kdRfopPU ZSBg== X-Gm-Message-State: AOAM532grU+8PHm1GWS5WP7uDDVeUm94JWfuyFLeDiSbXTMeLHxHs26e bHUzIVmReE66MPBKAamNdgE= X-Received: by 2002:a05:600c:4d13:: with SMTP id u19mr5400406wmp.16.1617545410337; Sun, 04 Apr 2021 07:10:10 -0700 (PDT) Received: from agape ([5.171.81.112]) by smtp.gmail.com with ESMTPSA id l9sm18106041wmq.2.2021.04.04.07.10.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Apr 2021 07:10:10 -0700 (PDT) From: Fabio Aiuto To: gregkh@linuxfoundation.org Cc: dan.carpenter@oracle.com, joe@perches.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Fabio Aiuto Subject: [PATCH v4 12/30] staging: rtl8723bs: fix null check conditions in core/rtw_cmd.c Date: Sun, 4 Apr 2021 16:09:28 +0200 Message-Id: <03e36e1710ea4dfd07c3753d9a8df5746e59bc18.1617545239.git.fabioaiuto83@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix post-commit hook checkpatch issues: CHECK: Comparison to NULL could be written "!psta" 178: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2012: + if (psta == NULL) CHECK: Comparison to NULL could be written "!psta" 198: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2066: + if (psta == NULL) CHECK: Comparison to NULL could be written "!psta" 211: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2081: + if (psta == NULL) Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index 2086df056c44..840b9da9f2d9 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -2009,7 +2009,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) psta = rtw_get_stainfo(&padapter->stapriv, pnetwork->MacAddress); if (!psta) { psta = rtw_alloc_stainfo(&padapter->stapriv, pnetwork->MacAddress); - if (psta == NULL) + if (!psta) goto createbss_cmd_fail; } @@ -2063,7 +2063,7 @@ void rtw_setstaKey_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pc struct set_stakey_rsp *psetstakey_rsp = (struct set_stakey_rsp *) (pcmd->rsp); struct sta_info *psta = rtw_get_stainfo(pstapriv, psetstakey_rsp->addr); - if (psta == NULL) + if (!psta) goto exit; exit: @@ -2078,7 +2078,7 @@ void rtw_setassocsta_cmdrsp_callback(struct adapter *padapter, struct cmd_obj * struct set_assocsta_rsp *passocsta_rsp = (struct set_assocsta_rsp *) (pcmd->rsp); struct sta_info *psta = rtw_get_stainfo(pstapriv, passocsta_parm->addr); - if (psta == NULL) + if (!psta) goto exit; psta->aid = passocsta_rsp->cam_id; -- 2.20.1