Skip to content

Commit

Permalink
[media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xf…
Browse files Browse the repository at this point in the history
…er()

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>
  • Loading branch information
Wei Yongjun authored and Mauro Carvalho Chehab committed Mar 26, 2013
1 parent 0170a39 commit 02745f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/media/go7007/go7007-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 02745f6

Please sign in to comment.