lkml.org 
[lkml]   [2017]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/7] staging: media: Use x instead of x != NULL
Date
Use x instead of x != NULL .
This patch removes the explicit NULL comparisons.This issue is found by
checkpatch.pl script.

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

diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c
index 165dcb3..40a5a2f 100644
--- a/drivers/staging/media/atomisp/i2c/gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/gc2235.c
@@ -255,7 +255,7 @@ static int gc2235_get_intg_factor(struct i2c_client *client,
u16 reg_val, reg_val_h, dummy;
int ret;

- if (info == NULL)
+ if (!info)
return -EINVAL;

/* pixel clock calculattion */
@@ -797,7 +797,7 @@ static int gc2235_set_fmt(struct v4l2_subdev *sd,
int idx;

gc2235_info = v4l2_get_subdev_hostdata(sd);
- if (gc2235_info == NULL)
+ if (!gc2235_info)
return -EINVAL;
if (format->pad)
return -EINVAL;
@@ -917,7 +917,7 @@ static int gc2235_s_config(struct v4l2_subdev *sd,
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;

- if (platform_data == NULL)
+ if (!platform_data)
return -ENODEV;

dev->platform_data =
--
2.7.4
\
 
 \ /
  Last update: 2017-03-02 20:55    [W:0.186 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site