Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3165046ybi; Mon, 17 Jun 2019 18:07:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxynxepiQaKF3qR6QXVSWNu0iIsWoWZmV0ArK2SKlYiau5n7NDDzsQCpZpNz7ad4HGnsC22 X-Received: by 2002:a17:902:9a04:: with SMTP id v4mr15377893plp.95.1560820054340; Mon, 17 Jun 2019 18:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560820054; cv=none; d=google.com; s=arc-20160816; b=gjUFDgdsk7Jg2XbQP73uMhCTkitvlOyN9tvZTByDcakJSVKPr4+9LrGW30AOiJ8pa+ jI+GbGyYPDio3vgjpHK2ZIdEtJDTT/rKyeFk5ZbreiPItR6Vly3yNMr2jNyw8BwZ4hW1 /RGrZ5YF4i4LJcglnRC0JnaRkzeaxKk3HVW99i1p8fx10j+DEUU60BsU4NWTG5Ee4FsR OEXQtE/LSoTnFyC4AA39RAa1QgFeOZGWt+I9he4fUitQ65Zg1t/IUT9MlJevZI0jqoXz kwKHYmJ5uaUIqlqpETAFNERNaTwwisGqwpohhrho3hn9x+SNX7Qguu1rH7+H4hhhkQGa OAYA== 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=3qTJFL8TPYAqD0lX4UvXoMh+5EQ/OFFtCVywLSut39U=; b=EkjpJp4kjSD5m1p8Nbhxg5nhIj3hBOLExCMzvXUej4x/0SCx4uDiffg3UWoiC6Td7O /vdC8FvN+ZxWhDuPAfeoWthoRP9SzuWkzNDWhcS46OTZnszX0NXJxJBcSywe2tL7wLBa 8T4rx1bWyYhwXO27rGbubxA3YbUd0LEGlNZu5JAUuUoZFfotZWRme61iB4Yooi/+euOY YKbQTIgq77r9QAXEh6brJ6+O8XtaK010SsoFNsfnc7aW25+luFR78yID3GfC/GRM+gEe TYZQLtlTuzgbBWF0w/Ah+DCtlOXltBidD0Dfgd71hXsxJ3bnkLjZojwq1TSyeuRuAr6F Mx0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HIchASJa; 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 b4si3844200pgk.502.2019.06.17.18.07.18; Mon, 17 Jun 2019 18:07:34 -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=HIchASJa; 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 S1726243AbfFRBHK (ORCPT + 99 others); Mon, 17 Jun 2019 21:07:10 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34369 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbfFRBHK (ORCPT ); Mon, 17 Jun 2019 21:07:10 -0400 Received: by mail-pf1-f196.google.com with SMTP id c85so6610426pfc.1 for ; Mon, 17 Jun 2019 18:07:09 -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=3qTJFL8TPYAqD0lX4UvXoMh+5EQ/OFFtCVywLSut39U=; b=HIchASJa206vE1wX0c7Oz9ds9JnvLJZKFYjW3anhBAHYujhrWUR9H0Lr9tZQpWO5kE huPFQLgon04TOH+mUxayg0ngWwQq4UPRfU9KRVL9yI8ZeMHaVVffXnqN3vV/VolXhHv3 h/SbSSprbALTU+4mFTtb+b/PuTMXJMWOyZnczYbvLpYkoMCmhfNzDXLAFepTHo3QVbdt c72/2m7wsqG6gUbA7Vi1tM+fOTG0tNuOnRkPQumXgFL4cGtplwG5awcVGaAcAgonF2BT Pc9Y4RnPJ6XQ/e+h14jhV9ancEKGQmx6+o38gQ1CoAzJMjDn5c9a2fnJxw3PdIB26nsF in9g== 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=3qTJFL8TPYAqD0lX4UvXoMh+5EQ/OFFtCVywLSut39U=; b=k8+jtjVlXtcfhwWzeiDkxhsEsA3UEIceFb0coLX2quRwpbKtG+rLJvWYnZqnE2L/wZ C5QoGikFDqu/SDdej1P4bdjZv06P97ZX2zDFmV74g74UnG2tdH3AvgCpWHUaho6WMfL9 py78wEGrts96MHn3wTXD/kq5W3NgNgl2brH3w22NXSn0vQ0M3h0L0CshcUMYST3cAm16 ffH1/6QGDGRsHZh0TSaQnLXH3TpCfAdY5+Qtw5JDSWEg7/tU0BCJIycAiJ8PNpb1KcDr q/nEJCOYOSE0TONZfHKlp49OdCMSw3cJgsi6qhRNjSnxLS5uIYFwgHAizMMuIAKyY1Hd 8wLg== X-Gm-Message-State: APjAAAWh5D5czDkBK/SVsJTGA5TZwtzVZD3Mm4GAhaDWUdsxqEY+luwg gpXJgN+kVVdZdRffvyzGrWA= X-Received: by 2002:a17:90a:5d15:: with SMTP id s21mr2134582pji.126.1560820029360; Mon, 17 Jun 2019 18:07:09 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.187]) by smtp.gmail.com with ESMTPSA id j16sm432558pjz.31.2019.06.17.18.07.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 18:07:08 -0700 (PDT) Date: Tue, 18 Jun 2019 06:37:03 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Hariprasad Kelam , Hans de Goede , Arnd Bergmann , Himadri Pandya , Nathan Chancellor , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] staging: rtl8723bs: hal: rtl8723b_hal_init: fix Comparison to NULL Message-ID: <20190618010703.GA7061@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 tries to fix below issues reported by checkpatch CHECK: Comparison to NULL could be written "!efuseTbl" CHECK: Comparison to NULL could be written "!psta" Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index 21f2365..624188e 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -1023,7 +1023,7 @@ static void hal_ReadEFuse_BT( } efuseTbl = rtw_malloc(EFUSE_BT_MAP_LEN); - if (efuseTbl == NULL) { + if (!efuseTbl) { DBG_8192C("%s: efuseTbl malloc fail!\n", __func__); return; } @@ -2139,7 +2139,7 @@ static void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_l return; psta = pmlmeinfo->FW_sta_info[mac_id].psta; - if (psta == NULL) + if (!psta) return; shortGIrate = query_ra_short_GI(psta); -- 2.7.4