summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-01-06 11:05:52 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-01 10:59:43 +0100
commit39de7d95f88d95a07f64b047c985fff31c006b5c (patch)
treed595c728e58c2d63f15f3d420d8ccdb53d81344b /drivers/media/i2c
parent[media] coda: fix first encoded frame payload (diff)
downloadlinux-39de7d95f88d95a07f64b047c985fff31c006b5c.tar.xz
linux-39de7d95f88d95a07f64b047c985fff31c006b5c.zip
[media] vpx3220: signedness bug in vpx3220_fp_read()
The intent was to return -1 on error and that's what the callers expect but the current code returns USHRT_MAX instead. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/vpx3220.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/vpx3220.c b/drivers/media/i2c/vpx3220.c
index 4b564f17f618..90b693f4e2ab 100644
--- a/drivers/media/i2c/vpx3220.c
+++ b/drivers/media/i2c/vpx3220.c
@@ -124,7 +124,7 @@ static int vpx3220_fp_write(struct v4l2_subdev *sd, u8 fpaddr, u16 data)
return 0;
}
-static u16 vpx3220_fp_read(struct v4l2_subdev *sd, u16 fpaddr)
+static int vpx3220_fp_read(struct v4l2_subdev *sd, u16 fpaddr)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
s16 data;