media: dvb-usb: don't check number of messages in the driver
authorWolfram Sang <wsa@the-dreams.de>
Sun, 20 May 2018 06:50:38 +0000 (02:50 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 27 Jul 2018 10:39:57 +0000 (06:39 -0400)
Since commit 1eace8344c02 ("i2c: add param sanity check to
i2c_transfer()"), the I2C core does this check now. We can remove it
from drivers.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/dvb-usb/m920x.c

index 51b026fa6bfbde4ff54a5651e3be77608dad786e..22554d9abd432fb475f2bdd2966c7a86ca5de5a0 100644 (file)
@@ -255,9 +255,6 @@ static int m920x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int nu
        int i, j;
        int ret = 0;
 
-       if (!num)
-               return -EINVAL;
-
        if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
                return -EAGAIN;