Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2185013ybi; Sun, 9 Jun 2019 05:52:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSB3aQJConP8xzD1sO5ppKTCuD9Bnd2/srFEDHVcnMwuYdB82Zb+Ww/QaRbLq0CMEaUDm2 X-Received: by 2002:aa7:90ce:: with SMTP id k14mr69531943pfk.239.1560084761954; Sun, 09 Jun 2019 05:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560084761; cv=none; d=google.com; s=arc-20160816; b=qMFp2aVQSD1pvFbAcXeDDZ+JtaFyWD9bsapQefBtLQzn7sutja0CgjLta8N7m5X2aC lbKJgkM10/ljKCL5ULIqhJrQ0C3D7GteWUQGCxCsJ+rqK4eF6T9VI5nBUT9HZ7y+bu9Z BTYVhLdVahgy+sVzQQaxq8WK/NgCSgVJpEM0M/02A/8aVvKoxan58UXBbj61SIoUtW50 1JHFXUmXnq1DsJRWOZjv69cOjjykhXi+oiFuF0/90EMv13GOMyvmBgkNF1NAFu5Dev5l 7INm8/P2ff00bFzWlm6mfXqgUUbBB3+SK2MsCGqiMrSxzjUNWjD87Y7Iuuuprm9ek+pQ WyYw== 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=GWbqPRicVJeNZyyJn+9jqmHZeCWZTUn9+XwG0T4VgwA=; b=tRsgU/scBlnYFFJkdWNTazqdkw7tTgsbJ8IUpkPKcnCO2v73M8wvU0KdCoAVOayZva cR37lsyRnb9Waof7RaaHLeFf1vXaxhbU56BwietUH5PrSlgnQilX+7sSlgbbCQTl7fsU KJIEjwmweZ90w8stC5Mp3+QyV/cwYi8fEdM6YNIgTwjEMWZw+FYPHY4wnempYrZK1/8D 4Ik9ZVcrLv7WryDYTlmK71dPTwjwiDQjvrG3wOxCRxhXcNXdgAW34czUat8t+lGEPtH+ ZFPm+fNPApWXA7eFt/PxzD1MxFuAgKpQll4ODshz2Nd64dW98JbCQA25y4ZtmZ6aT7BJ 9vHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nBEFrbsY; 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 i1si1274032pfr.203.2019.06.09.05.52.12; Sun, 09 Jun 2019 05:52:41 -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=nBEFrbsY; 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 S1728473AbfFIMs6 (ORCPT + 99 others); Sun, 9 Jun 2019 08:48:58 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36789 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728319AbfFIMs5 (ORCPT ); Sun, 9 Jun 2019 08:48:57 -0400 Received: by mail-pg1-f194.google.com with SMTP id a3so3578094pgb.3 for ; Sun, 09 Jun 2019 05:48:57 -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=GWbqPRicVJeNZyyJn+9jqmHZeCWZTUn9+XwG0T4VgwA=; b=nBEFrbsYSyLw9JK8mSoYmUtoaLLg1kZvEZE8OZu+2t8xdYiz012j+tncUdTqyRMmL2 Vla33Vvj9KNr+gCHDZhoVmMbYj3UjaESqHRorsGzAu7UE9sqS3tAptabgrm/97O4GF1B wTsxVsf20HOkQuAjjrMIfzdeKIw9FtDeEkfAyPBflHZZZwVyY3mb2hINUfsORmMmLtOV 4kTjz0P9PCRgbIUaEekduvvYk7/ksvT0PiuV0VnZtikLauCUVx5Oma+KhcW2hra/eo2/ Eup1QNLhH8VU8lIYU8lbW9Zf5OXSdXKUdCIfeIM0bb8LQSiuzTNTn2Vw4Faw3XR9CVfd 8/4Q== 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=GWbqPRicVJeNZyyJn+9jqmHZeCWZTUn9+XwG0T4VgwA=; b=nv/mK+cIz3SbYtNrc0y3RlYm/A2+iL/SM2lI3akOnbWUGASyDkW2mpl+RqIlvotG1s WCxBwrK3XJzD6TT/QppOwqfQAPX5b58w+hLo2yQx0nC4KigHEei2SiCjtCUi2y7IyDhV oqAgsbtWE759cjOGVLpKPAJgUr+WgyhZJoCPzqsB7GU3+m9F/tZXrt/Ag238EmXqdi+S OzR6mSGAhtTdFdf5IvgepJamjGpKFnyZH0LMT98rVM0MVColHYn3VrxBqCQMbDrh1oFx QNivYsN77jRwGlM4HqZSTqAm9ANSHDSCOf7fiAe8NOou9m+0bo3Hv/eKU4GPBeYmVjn4 kVMw== X-Gm-Message-State: APjAAAWk2pasHFbECNtwJiRRYPqZms7OGAMcItYW5f0kmvIgmoY9vUT+ joEv/4ExxYALSsCudhUSIuA= X-Received: by 2002:a63:f957:: with SMTP id q23mr11574838pgk.326.1560084537116; Sun, 09 Jun 2019 05:48:57 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.89.153]) by smtp.gmail.com with ESMTPSA id u7sm6991216pgl.64.2019.06.09.05.48.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jun 2019 05:48:56 -0700 (PDT) Date: Sun, 9 Jun 2019 18:18:51 +0530 From: Hariprasad Kelam To: Greg Kroah-Hartman , Hariprasad Kelam , Hans de Goede , Michael Straube , Arnd Bergmann , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] staging: rtl8723bs: fix warning comparison to NULL Message-ID: <20190609124851.GA4043@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 "!pxmitbuf->pallocated_buf" + if (pxmitbuf->pallocated_buf == NULL) Signed-off-by: Hariprasad Kelam --- drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c index 4e4e565..c125ac2 100644 --- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c @@ -50,7 +50,7 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitb { if (alloc_sz > 0) { pxmitbuf->pallocated_buf = rtw_zmalloc(alloc_sz); - if (pxmitbuf->pallocated_buf == NULL) + if (!pxmitbuf->pallocated_buf) return _FAIL; pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ); -- 2.7.4