Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1596454
| From | simran singhal <singhalsimran0@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v1 6/7] staging: gc2235: Use x instead of x != NULL |
| Date | 2017-03-10 00:00 +0100 |
| Message-ID | <tjfcm-3bj-13@gated-at.bofh.it> (permalink) |
| References | <tjfcl-3bj-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v1 6/7] staging: gc2235: Use x instead of x != NULL simran singhal <singhalsimran0@gmail.com> - 2017-03-10 00:00 +0100
csiph-web