]> git.baikalelectronics.ru Git - kernel.git/commit
[media] em28xx-i2c: fix the error code for unknown errors
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Sun, 19 Jan 2014 21:48:35 +0000 (18:48 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 4 Feb 2014 18:43:05 +0000 (16:43 -0200)
commit12ba6d3e526ba607755be271fa98dec650d77bc0
treef8747e8fa247f98be7b79d356753021524a9fd58
parent81b3dccd95bfc208107e78f34c48733a36c33d64
[media] em28xx-i2c: fix the error code for unknown errors

Commit dc8b4e4524 "em28xx-i2c: Fix error code for I2C error transfers"
changed the code to return -ETIMEDOUT on all unknown errors.
But the proper error code for unknown errors is -EIO.
So only report -ETIMEDOUT in case of the errors 0x02 and 0x04, which
are according to Mauro Carvalho Chehab's tests related to i2c clock
stretching and return -EIO for the rest.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-i2c.c