diff mbox

[media] V4L: Use NULL pointer instead of plain integer in v4l2-ctrls.c file

Message ID 1341918886-7911-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat July 10, 2012, 11:14 a.m. UTC
Fixes the following sparse warning:
drivers/media/video/v4l2-ctrls.c:2123:43: warning: Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/media/video/v4l2-ctrls.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Hans Verkuil July 10, 2012, 11:27 a.m. UTC | #1
On Tue 10 July 2012 13:14:46 Sachin Kamat wrote:
> Fixes the following sparse warning:
> drivers/media/video/v4l2-ctrls.c:2123:43: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

> ---
>  drivers/media/video/v4l2-ctrls.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
> index 9abd9ab..18101d6 100644
> --- a/drivers/media/video/v4l2-ctrls.c
> +++ b/drivers/media/video/v4l2-ctrls.c
> @@ -2120,7 +2120,7 @@ static int prepare_ext_ctrls(struct v4l2_ctrl_handler *hdl,
>  
>  	/* First zero the helper field in the master control references */
>  	for (i = 0; i < cs->count; i++)
> -		helpers[i].mref->helper = 0;
> +		helpers[i].mref->helper = NULL;
>  	for (i = 0, h = helpers; i < cs->count; i++, h++) {
>  		struct v4l2_ctrl_ref *mref = h->mref;
>  
>
diff mbox

Patch

diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
index 9abd9ab..18101d6 100644
--- a/drivers/media/video/v4l2-ctrls.c
+++ b/drivers/media/video/v4l2-ctrls.c
@@ -2120,7 +2120,7 @@  static int prepare_ext_ctrls(struct v4l2_ctrl_handler *hdl,
 
 	/* First zero the helper field in the master control references */
 	for (i = 0; i < cs->count; i++)
-		helpers[i].mref->helper = 0;
+		helpers[i].mref->helper = NULL;
 	for (i = 0, h = helpers; i < cs->count; i++, h++) {
 		struct v4l2_ctrl_ref *mref = h->mref;