public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Harsh Jain <harshjain32@gmail.com>
To: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, harshjain32@gmail.com,
	harshjain.prof@gmail.com
Subject: [PATCH 2/2] staging:kpc2000:Fix integer as null pointer warning
Date: Fri, 28 Jun 2019 22:30:46 +0530	[thread overview]
Message-ID: <20190628170046.3219-3-harshjain32@gmail.com> (raw)
In-Reply-To: <20190628170046.3219-2-harshjain32@gmail.com>

From: root <harshjain32@gmail.com>

It fixes "Using plain integer as NULL pointer"
sparse warning.

Signed-off-by: Harsh Jain <harshjain32@gmail.com>
---
 drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
index 204f33d0dc69..155da641e3a2 100644
--- a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
+++ b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
@@ -679,9 +679,9 @@ static int pi2c_remove(struct platform_device *pldev)
     //pci_set_drvdata(dev, NULL);
     
     //cdev_del(&lddev->cdev);
-    if(lddev != 0) {
+    if(lddev != NULL) {
         kfree(lddev);
-        pldev->dev.platform_data = 0;
+        pldev->dev.platform_data = NULL;
     }
     
     return 0;
-- 
2.17.1


  reply	other threads:[~2019-06-28 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 17:00 [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning Harsh Jain
2019-06-28 17:00 ` [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning Harsh Jain
2019-06-28 17:00   ` Harsh Jain [this message]
2019-06-28 17:26 ` [PATCH 0/2] staging:kpc2000:Fix integer as null pointer warning harsh jain
  -- strict thread matches above, loose matches on Subject: below --
2019-06-28 17:27 Harsh Jain
2019-06-28 17:27 ` [PATCH 1/2] staging:kpc2000:Fix symbol not declared warning Harsh Jain
2019-06-28 17:27   ` [PATCH 2/2] staging:kpc2000:Fix integer as null pointer warning Harsh Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190628170046.3219-3-harshjain32@gmail.com \
    --to=harshjain32@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=harshjain.prof@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox