Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp442752ybi; Thu, 13 Jun 2019 19:56:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5S20YiwewNvT6m9Gn5bzRal7uHioxptBYBsl+KIqIqQzZ4Xbod6m0mStOkK/Nzj6vLp4a X-Received: by 2002:a17:90a:8d86:: with SMTP id d6mr8304816pjo.127.1560480964056; Thu, 13 Jun 2019 19:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560480964; cv=none; d=google.com; s=arc-20160816; b=PhVzu1yeslu+qYlO6cjyNJNFWqCniU3BArMGhYALi9n7N97rAox3S7zbB2CnnJiS9e GllT/C/6nhI/wwTNjFULtDaiVR7TaMJ83DR2W8Bl4WQKKZJU9V1WdKGKjPj6VjFFoEkM IhE7jhBmp+PqOLgVfHhqwm1/ybMfJfSL36GuSpXbO1gq1+zmcjpzNNE3zLu3NaRq+LrI kW1mbUZxeJGyBoLw1Uujv+UDvYWt7nBUq+EE4RxqRJym94l029URrW7dcJ40dCfqFAcW iqeB8L/8kbFGyXvu8ysRVIflCQfIDlCvNvnAL9tFZLmlTNSGdqFbFIF90Uda69Rej8Q5 cyrw== 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=SwSZeh81DBlOnvWVgHdXN91MkGQB7AkIc/s+fZav48I=; b=EF0zWkxsQyr2JRaCCFME7s1vR1Fd7u96bMsjZts3QmF8tybu80UZD5TBtYHOyI0D8f 9H31PpW0QO7NsWq3xprZyOhO41OyhejESW9GS2FB5nA5LHAHYQXQFbYmAPfHDPp6tv12 6J9X5oL20yyBi9MRKdXL2Lo+ke1a7oYpGsDDVbfdLOC6KNcUYIK5W/Sgt5ab07XW21Mr +nFxf610SVIKAxXWRfM2B3M6DbaoQsZdpslqTFGHy/xxI0Jb1FrgvsteFO7L1J7rpbUt 8ueUkp32hFl9lepa18TVs+kW/5MmrG2XwJOl5CSja65koPFKEqeLDIleads6xOVz6paE R0MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mZgMNuII; 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 q3si1060767pjv.92.2019.06.13.19.55.48; Thu, 13 Jun 2019 19:56:04 -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=mZgMNuII; 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 S1726860AbfFNCzY (ORCPT + 99 others); Thu, 13 Jun 2019 22:55:24 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42608 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725864AbfFNCzX (ORCPT ); Thu, 13 Jun 2019 22:55:23 -0400 Received: by mail-pf1-f193.google.com with SMTP id q10so462544pff.9 for ; Thu, 13 Jun 2019 19:55:23 -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=SwSZeh81DBlOnvWVgHdXN91MkGQB7AkIc/s+fZav48I=; b=mZgMNuIICMJ535dfwlrSQzVmNFBy9rpWsCv0yaKH6iq4Xu5Bf8q89rii/7rBR/k/UP etYiSsEg72LzqI/pmcOInN6jpurv8Hl3O47tnPKU9n7bIYux4r9sXziHKCG4kGCR+/yi qSpquCRxpm6A7gSAdmv+tO+O3hcEX7vwILUwq0tcff6BDR7sG1TbEYM3Qw0iXXnhdJD7 koP9HhsTWD8ZVFEEZvBo7vN5pf14q10DNGp4B1g/QYepd/OCWqRpqOXdcYzs/ZSr56Zh 58R98oqe2j5peb2me25tz2bxoEUptrgHrZhYnr5zl8R4m0CZyuiEMd4pc8vdj48HwQ6S uvtQ== 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=SwSZeh81DBlOnvWVgHdXN91MkGQB7AkIc/s+fZav48I=; b=quy7jYpi4y2PpYwtkKua2mbPZGTXgQrk5lwo1Yzz2F9qKodadIUuT5jFh1lQ62qWIj 2mgMy4+zu+7tEQRrJcTvUNvxGn/ejO3p1de08f9+2Q+RuPU49UQagOjU5/Hnos0FGovF 9KyXBj0AouCa+BPRFRSThcZyJ1si10EgH/hfQ4uGqlDrQcmfToUGlRf3QqwB9sfWVB4F TksykrRHIuH/WLgYIv0HGnyWdDrgr7oPD+/SvMyWZ3nPX0irMDAsIQKgBVWJ8dJRlYNP 6tMhJ3iLz5cOTbQMOO4UN7Tm6u1pppDbijyFz7O+zFgrq9e4VXsxO4XjP+WNrP148xU2 L/kQ== X-Gm-Message-State: APjAAAVe92/PUhlkbmJ2YgXy78NAkdMFWk8SAwzE2lc3lP0oDhJFWSos L7beIDf6QxBMBR0An3f7kaU= X-Received: by 2002:a63:d458:: with SMTP id i24mr24164947pgj.171.1560480923027; Thu, 13 Jun 2019 19:55:23 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.89.153]) by smtp.gmail.com with ESMTPSA id j2sm1033788pfb.157.2019.06.13.19.55.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 19:55:22 -0700 (PDT) Date: Fri, 14 Jun 2019 08:25:19 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Hariprasad Kelam , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [Patch v2 3/3] staging: rtl8723bs: hal: sdio_halinit: fix Comparison to NULL Message-ID: <20190614025519.GA3459@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 issue reported by checkpatch CHECK: Comparison to NULL could be written "psta" CHECK: Comparison to NULL could be written "psta" Signed-off-by: Hariprasad Kelam ----- changes in v2: Send proper patch with out corruption ---- --- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c index 5c7cff0..6f10349 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c @@ -1558,7 +1558,7 @@ static void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val) DBG_871X_LEVEL(_drv_always_, "WOWLAN_DISABLE\n"); psta = rtw_get_stainfo(&padapter->stapriv, get_bssid(pmlmepriv)); - if (psta != NULL) + if (psta) rtl8723b_set_FwMediaStatusRpt_cmd(padapter, RT_MEDIA_DISCONNECT, psta->mac_id); else DBG_871X("psta is null\n"); @@ -1673,7 +1673,7 @@ static void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val) (pwrctl->wowlan_wake_reason != Rx_DeAuth) ) { rtl8723b_set_FwJoinBssRpt_cmd(padapter, RT_MEDIA_CONNECT); - if (psta != NULL) + if (psta) rtl8723b_set_FwMediaStatusRpt_cmd(padapter, RT_MEDIA_CONNECT, psta->mac_id); } #ifdef CONFIG_PNO_SUPPORT -- 2.7.4