Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4109777ybi; Tue, 18 Jun 2019 11:59:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzm4i8BoigsMDyJw+qMTXtfluuhr1E6vhY97MThdnbxzqlcTSFgc7dpIksz6I02iUNXPrvD X-Received: by 2002:a17:902:968c:: with SMTP id n12mr21023519plp.59.1560884394412; Tue, 18 Jun 2019 11:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560884394; cv=none; d=google.com; s=arc-20160816; b=T7uvMEoGI57uBblLuMKTm5TF5kIBVmau8mGHgKhZqHiVVlYhqejznY5hUh74ROAIbb t4VqnbTOS61Skoa8ruZSBytCaomDUUWvbOcJTft6QglYfR1Vu143wmsrk0vreLBtedko LMVsvYoXyOdBuM2dRY9yrYze1bQZdKBJ45PAaXxFsdYjaxwpsQD2XgNWKNeIJz5f87lg DkU9dpdW5j+rI9j5ZBUXnv0Z+loQR6t99DQ3t8pe4+rgSDX25wa2pBrHU8KLzy/j7B7a a2xi3nLR7x2+7WVACGmj2vrvCH0KHCg/rUe8M3Udifrvi0XJLvwYzViyDdWdITK18wxB 1MFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=KhmMKOSmpu8SqgnzUE1h6NWxiRGa7i6ZJDyLxzhQcgY=; b=NQwJSOV7SWYY//XIZ5hkV7xwKazHQn+pDoMmDitofvyjyavccj3DJ6oB+lXgMfwDH9 I2pG/3nVzUlWcdKmGS78Ge3TyWXxFJ0NB1RcNQAw3elCZO6+L3lcb0qP/lhQfc29d2zj bw0x+79edZ9zfkd+BjxkvIvLhfS/SJZt0cqy4+xVl5KiO4brED6ZhicTSVONz+hrm70J axnNdpH7BqSkRe2XMdtXkWG0voTTQ+eDuZ0yKoCTAvwt5ybruSBOoJbT6BEEFD6UkxoM AalKc3NduWpBGPO6i2jH8KqKnsWbdQ9HuIDCBBy9DLyKuyBXq0jGC0e5C5CNfwnsnVQy AQqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=StBLuVNj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z26si15458244pfj.247.2019.06.18.11.59.39; Tue, 18 Jun 2019 11:59:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=StBLuVNj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730468AbfFRS7P (ORCPT + 99 others); Tue, 18 Jun 2019 14:59:15 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35768 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730332AbfFRS7O (ORCPT ); Tue, 18 Jun 2019 14:59:14 -0400 Received: by mail-pg1-f194.google.com with SMTP id s27so8195755pgl.2 for ; Tue, 18 Jun 2019 11:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=KhmMKOSmpu8SqgnzUE1h6NWxiRGa7i6ZJDyLxzhQcgY=; b=StBLuVNjXb1KUTHS1j3aOzNsFTQanhyAF9GXBkg8HHVIv77BKCnUGSDghC7ir30Xqb id03qaWdx03OCflYSHi0Z/Jj/jDY+oRc3MJ85hLpXZUDyhoGEMaEsjYf5llCq9C+5cC6 ispDXsq71X1YyZmaKKjxphcqam1vpHa9h6dFeUfvZZjYQB1rStZ9jcb5P7BU3uVXHriJ 2a/hAVydqU9UWBbsYlWhSEtq5m/GKbl2rnOqqgvdNsp4Ujm0JABeO8o2TqBgfVrj0yqj v5yUWrjiZDjdSAxredbylMPTIJB4ZKxihbAymHEvM+7PpXulZ5dcSpx5Nsp77+llN5Vp qRDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=KhmMKOSmpu8SqgnzUE1h6NWxiRGa7i6ZJDyLxzhQcgY=; b=WZ3V2e8qBw1gWWVz+NQYlajJVAsFdfNawnWlOsFjVkDMlb10d7KN6adOeCjX2CJeIg 35JLoxoujGFXWW3A5lTrSGvez9GughxM6RKWb2Ccbo0MOR0ycA+wLYn42g9jRfNMTp7T 7mlvvuR3bl2Wu2Djic9O0+X/BqzGIIIMAviviHmvqooPvg7WcIA582bhvvD1nSJmBpIR Wx7wyEuewv7RjgDr1J5Kt4BzyE78OuE4ljIj/pa3JcAdYOQxjvcaCXqHPVgUkea0O1L4 mvgogwYKe37OMvf/pnWfKl2vmO4zScS+r2swfF4F19iYr8LrrnaHdKlvIVHDDJF9XJxF 0S0Q== X-Gm-Message-State: APjAAAUNOybknoKvV1Sh6y4GTWJ0jR6LuZsPPvXqhKk4KnINt9JiYgwZ 9U8BAp2zMS2oI8ywjAFiqCA= X-Received: by 2002:a62:e315:: with SMTP id g21mr6651308pfh.225.1560884354089; Tue, 18 Jun 2019 11:59:14 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.187]) by smtp.gmail.com with ESMTPSA id n89sm6532091pjc.0.2019.06.18.11.59.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 11:59:13 -0700 (PDT) Date: Wed, 19 Jun 2019 00:29:08 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Hariprasad Kelam , Himadri Pandya , Nishka Dasgupta , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] staging: rtl8723bs: hal: rtl8723b_cmd: fix Comparison to NULL Message-ID: <20190618185908.GA10489@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes below issues reported by checkpatch CHECK: Comparison to NULL could be written "psta" CHECK: Comparison to NULL could be written "pmlmepriv->wps_probe_resp_ie" CHECK: Comparison to NULL could be written "psta" Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c index e001d30..ceb317f 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c @@ -436,7 +436,7 @@ static void ConstructARPResponse( DBG_871X("%s(): Add MIC\n", __func__); psta = rtw_get_stainfo(&padapter->stapriv, get_my_bssid(&(pmlmeinfo->network))); - if (psta != NULL) { + if (psta) { if (!memcmp(&psta->dot11tkiptxmickey.skey[0], null_key, 16)) { DBG_871X("%s(): STA dot11tkiptxmickey == 0\n", __func__); } @@ -753,7 +753,7 @@ static void ConstructProbeRsp(struct adapter *padapter, u8 *pframe, u32 *pLength cur_network->IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen); /* inerset & update wps_probe_resp_ie */ - if ((pmlmepriv->wps_probe_resp_ie != NULL) && pwps_ie && (wps_ielen > 0)) { + if (pmlmepriv->wps_probe_resp_ie && pwps_ie && (wps_ielen > 0)) { uint wps_offset, remainder_ielen; u8 *premainder_ie; @@ -1316,7 +1316,7 @@ static void rtl8723b_set_FwWoWlanRelated_cmd(struct adapter *padapter, u8 enable if (!(ppwrpriv->wowlan_pno_enable)) { psta = rtw_get_stainfo(&padapter->stapriv, get_bssid(pmlmepriv)); - if (psta != NULL) + if (psta) rtl8723b_set_FwMediaStatusRpt_cmd(padapter, RT_MEDIA_CONNECT, psta->mac_id); } else DBG_871X("%s(): Disconnected, no FwMediaStatusRpt CONNECT\n", __func__); -- 2.7.4