diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-06-30 09:40:32 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-07-26 15:14:10 +0200 |
commit | 3f1a94ba9fce90dbe0d26806a027964bea7adc14 (patch) | |
tree | b1531aa247c29feb4e3e071701e3eb6e43e446f4 | |
parent | [media] s5p-g2d: Fix registration failure (diff) | |
download | linux-3f1a94ba9fce90dbe0d26806a027964bea7adc14.tar.xz linux-3f1a94ba9fce90dbe0d26806a027964bea7adc14.zip |
[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>
-rw-r--r-- | drivers/media/i2c/ml86v7667.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/ml86v7667.c b/drivers/media/i2c/ml86v7667.c index efdc873e58d1..a9857022f71d 100644 --- a/drivers/media/i2c/ml86v7667.c +++ b/drivers/media/i2c/ml86v7667.c @@ -117,7 +117,7 @@ static int ml86v7667_s_ctrl(struct v4l2_ctrl *ctrl) { struct v4l2_subdev *sd = to_sd(ctrl); struct i2c_client *client = v4l2_get_subdevdata(sd); - int ret; + int ret = -EINVAL; switch (ctrl->id) { case V4L2_CID_BRIGHTNESS: @@ -157,7 +157,7 @@ static int ml86v7667_s_ctrl(struct v4l2_ctrl *ctrl) break; } - return 0; + return ret; } static int ml86v7667_querystd(struct v4l2_subdev *sd, v4l2_std_id *std) |