You are right. I am very sorry for my mistake and I will send another patch fix this. > Is the first chunk of your patch really necessary? > `msg[0].len < 2` includes the `msg[0].len == 0` case, > so the `msg.buf == NULL && msg.len == 0` case is (seemed to me) > safely ejected as it is. > >> --- a/drivers/media/usb/dvb-usb-v2/gl861.c >> +++ b/drivers/media/usb/dvb-usb-v2/gl861.c >> @@ -97,7 +97,7 @@ static int gl861_i2c_master_xfer(struct i2c_adapt >> >> er *adap, struct i2c_msg msg[], >> /* XXX: I2C adapter maximum data lengths are not tested */ >> if (num == 1 && !(msg[0].flags & I2C_M_RD)) { >> /* I2C write */ >> - if (msg[0].len < 2 || msg[0].len > sizeof(ctx->buf)) { >> + if (msg[0].len == 0 || msg[0].len > sizeof(ctx->buf)) { >> ret = -EOPNOTSUPP; >> goto err; >> } > > regards, > akihiro >