Skip to contentSkip to conversation

em28xx: Fix: I2C_CLK write error message checks wrong return code

PATCH New Sascha Sommer 1 participant 1 message Jan 7, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 em28xx: Fix: I2C_CLK write error message checks wrong return code

Hello,

it looks like the return value check that is done after setting the I2C speed checks the wrong return code. Attached patch fixes this problem.

Regards

Sascha

Fix: I2C_CLK write error message checks wrong return code

drivers/media/video/em28xx/em28xx-cards.c +1 -1
index 897a432..349e674 100644
@@ -3015,7 +3015,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, 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",