[media] em28xx: Fix: I2C_CLK write error message checks wrong return code
authorSascha Sommer <saschasommer@freenet.de>
Sun, 8 Jan 2012 19:19:30 +0000 (16:19 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 11 Jan 2012 00:47:27 +0000 (22:47 -0200)
It looks like the return value check that is done after setting the I2C
speed checks the wrong return code.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-cards.c

index ebfb7a3beab29f7853871110508fdd0e3d50f2f9..6448011e3a1b5e076ea160b1e89b51bbc8cb5d36 100644 (file)
@@ -3014,7 +3014,7 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
 
        if (!dev->board.is_em2800) {
                /* Resets I2C speed */
-               em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
+               retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
                if (retval < 0) {
                        em28xx_errdev("%s: em28xx_write_reg failed!"
                                      " retval [%d]\n",