From: Sascha Sommer Date: Sun, 8 Jan 2012 19:19:30 +0000 (-0300) Subject: [media] em28xx: Fix: I2C_CLK write error message checks wrong return code X-Git-Tag: v3.3-rc1~48^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0903bb540e5bb99a9e58d583a596a30620f65702;p=platform%2Fkernel%2Flinux-exynos.git [media] em28xx: Fix: I2C_CLK write error message checks wrong return code 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index ebfb7a3..6448011 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c @@ -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",