Commit 037f4e6b6be47dcfb3f4e78e5c6abe7da92da1dd

Authored by Hans Verkuil
Committed by Mauro Carvalho Chehab
1 parent 8a09a4cc9b

[media] ml86v7667: fix compile warning: 'ret' set but not used

media_build/v4l/ml86v7667.c: In function 'ml86v7667_s_ctrl':
media_build/v4l/ml86v7667.c:120:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  int ret;
      ^
And indeed, ret is set but not used. Let's actually return the error
code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/media/i2c/ml86v7667.c
... ... @@ -117,7 +117,7 @@
117 117 {
118 118 struct v4l2_subdev *sd = to_sd(ctrl);
119 119 struct i2c_client *client = v4l2_get_subdevdata(sd);
120   - int ret;
  120 + int ret = -EINVAL;
121 121  
122 122 switch (ctrl->id) {
123 123 case V4L2_CID_BRIGHTNESS:
... ... @@ -157,7 +157,7 @@
157 157 break;
158 158 }
159 159  
160   - return 0;
  160 + return ret;
161 161 }
162 162  
163 163 static int ml86v7667_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)