public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: simran singhal <singhalsimran0@gmail.com>
To: mchehab@kernel.org
Cc: gregkh@linuxfoundation.org, linux-media@vger.kernel.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	outreachy-kernel@googlegroups.com
Subject: [PATCH v1 3/7] staging: gc2235: Replace NULL with "!"
Date: Fri, 10 Mar 2017 04:20:25 +0530	[thread overview]
Message-ID: <1489099829-1264-4-git-send-email-singhalsimran0@gmail.com> (raw)
In-Reply-To: <1489099829-1264-1-git-send-email-singhalsimran0@gmail.com>

Use ! in comparison tests using "==NULL" rather than moving the
"==NULL" to the right side of the test.

Addesses multiple instances of the checkpatch.pl warning:
WARNING: Comparisons should place the constant on the right side of the
test

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
 drivers/staging/media/atomisp/i2c/gc2235.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c
index 7de7e24..2ef876a 100644
--- a/drivers/staging/media/atomisp/i2c/gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/gc2235.c
@@ -603,7 +603,7 @@ static int power_up(struct v4l2_subdev *sd)
 	struct i2c_client *client = v4l2_get_subdevdata(sd);
 	int ret;
 
-	if (NULL == dev->platform_data) {
+	if (!dev->platform_data) {
 		dev_err(&client->dev,
 			"no camera_sensor_platform_data");
 		return -ENODEV;
@@ -647,7 +647,7 @@ static int power_down(struct v4l2_subdev *sd)
 	struct i2c_client *client = v4l2_get_subdevdata(sd);
 	int ret = 0;
 
-	if (NULL == dev->platform_data) {
+	if (!dev->platform_data) {
 		dev_err(&client->dev,
 			"no camera_sensor_platform_data");
 		return -ENODEV;
-- 
2.7.4

  parent reply	other threads:[~2017-03-09 22:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 22:50 [PATCH v1 0/7] staging: gc2235: Multiple checkpatch issues simran singhal
2017-03-09 22:50 ` [PATCH v1 1/7] staging: gc2235: Remove unnecessary typecast of c90 int constant simran singhal
2017-03-12 14:20   ` Greg KH
2017-03-09 22:50 ` [PATCH v1 2/7] staging: gc2235: Add blank line after a declaration simran singhal
2017-03-09 22:50 ` simran singhal [this message]
2017-03-09 22:50 ` [PATCH v1 4/7] staging: gc2235: Remove blank line before '}' and after '{' braces simran singhal
2017-03-09 22:50 ` [PATCH v1 5/7] staging: gc2235: Remove multiple assignments simran singhal
2017-03-09 22:50 ` [PATCH v1 6/7] staging: gc2235: Use x instead of x != NULL simran singhal
2017-03-09 22:50 ` [PATCH v1 7/7] staging: gc2235: Do not use multiple blank lines simran singhal

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=1489099829-1264-4-git-send-email-singhalsimran0@gmail.com \
    --to=singhalsimran0@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=outreachy-kernel@googlegroups.com \
    /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