diff options
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/go7007/go7007-usb.c | 2 |
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 a734ead8fc64..50066e01a6ed 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; |