aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-26 04:45:11 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-26 08:37:46 -0300
commit02745f63443c08b9b82ab2d654a0f5fc3699e586 (patch)
tree2b15134d74a6e8575d4e083dd017de5e53538182 /drivers/staging/media
parent0170a39b69ae65fffb40bd162730e3de2b87c835 (diff)
downloadvexpress-lsk-02745f63443c08b9b82ab2d654a0f5fc3699e586.tar.gz
[media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()
sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/go7007/go7007-usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c
index a734ead8fc6..50066e01a6e 100644
--- a/drivers/staging/media/go7007/go7007-usb.c
+++ b/drivers/staging/media/go7007/go7007-usb.c
@@ -1037,7 +1037,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter,
buf, buf_len, 0) < 0)
goto i2c_done;
if (msgs[i].flags & I2C_M_RD) {
- memset(buf, 0, sizeof(buf));
+ memset(buf, 0, msgs[i].len + 1);
if (go7007_usb_vendor_request(go, 0x25, 0, 0, buf,
msgs[i].len + 1, 1) < 0)
goto i2c_done;