diff options
author | Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> | 2015-10-26 06:09:27 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-27 16:53:12 +0900 |
commit | 9058fc9262057c8f6c17b122b69217cdb4fc4643 (patch) | |
tree | cb8f7174575b1d6e16446ed573539573b76473b9 /drivers/staging/media/omap4iss/iss_video.c | |
parent | a09ad8c7a3285b99b7d976deadbd62ed1ac4c90e (diff) |
staging: media: omap4iss: Fixes NULL comparison
This patch fixes the checkpatch issue:
CHECK: Comparison to NULL could be written
Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/omap4iss/iss_video.c')
-rw-r--r-- | drivers/staging/media/omap4iss/iss_video.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index 40405d8710a6..a98991a2c7fd 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c @@ -191,7 +191,7 @@ iss_video_remote_subdev(struct iss_video *video, u32 *pad) remote = media_entity_remote_pad(&video->pad); - if (remote == NULL || + if (!remote || media_entity_type(remote->entity) != MEDIA_ENT_T_V4L2_SUBDEV) return NULL; @@ -241,7 +241,7 @@ __iss_video_get_format(struct iss_video *video, int ret; subdev = iss_video_remote_subdev(video, &pad); - if (subdev == NULL) + if (!subdev) return -EINVAL; memset(&fmt, 0, sizeof(fmt)); @@ -471,7 +471,7 @@ struct iss_buffer *omap4iss_video_buffer_next(struct iss_video *video) return NULL; } - if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->input != NULL) { + if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->input) { spin_lock(&pipe->lock); pipe->state &= ~ISS_PIPELINE_STREAM; spin_unlock(&pipe->lock); @@ -624,7 +624,7 @@ iss_video_try_format(struct file *file, void *fh, struct v4l2_format *format) return -EINVAL; subdev = iss_video_remote_subdev(video, &pad); - if (subdev == NULL) + if (!subdev) return -EINVAL; iss_video_pix_to_mbus(&format->fmt.pix, &fmt.format); @@ -806,7 +806,7 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) pipe->input = far_end; pipe->output = video; } else { - if (far_end == NULL) { + if (!far_end) { ret = -EPIPE; goto err_iss_video_check_format; } @@ -841,7 +841,7 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) * to the stream on command. In memory-to-memory mode, it will be * started when buffers are queued on both the input and output. */ - if (pipe->input == NULL) { + if (!pipe->input) { unsigned long flags; ret = omap4iss_pipeline_set_stream(pipe, @@ -974,14 +974,14 @@ static int iss_video_open(struct file *file) int ret = 0; handle = kzalloc(sizeof(*handle), GFP_KERNEL); - if (handle == NULL) + if (!handle) return -ENOMEM; v4l2_fh_init(&handle->vfh, &video->video); v4l2_fh_add(&handle->vfh); /* If this is the first user, initialise the pipeline. */ - if (omap4iss_get(video->iss) == NULL) { + if (!omap4iss_get(video->iss)) { ret = -EBUSY; goto done; } @@ -1116,7 +1116,7 @@ int omap4iss_video_init(struct iss_video *video, const char *name) mutex_init(&video->stream_lock); /* Initialize the video device. */ - if (video->ops == NULL) + if (!video->ops) video->ops = &iss_video_dummy_ops; video->video.fops = &iss_video_fops; |