mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
[media] em28xx-camera: fix return value checks on sensor probing
Since commit e63b009d6e the returned error code in case of not connected/responding i2c clients is ENXIO isntead of ENODEV, which causes several error messages on sensor probing. Fix the i2c return value checks on sensor probing to silence these warnings. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
103f18a27d
commit
cb497c75fd
@ -120,7 +120,7 @@ static int em28xx_probe_sensor_micron(struct em28xx *dev)
|
|||||||
reg = 0x00;
|
reg = 0x00;
|
||||||
ret = i2c_master_send(&client, ®, 1);
|
ret = i2c_master_send(&client, ®, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (ret != -ENODEV)
|
if (ret != -ENXIO)
|
||||||
em28xx_errdev("couldn't read from i2c device 0x%02x: error %i\n",
|
em28xx_errdev("couldn't read from i2c device 0x%02x: error %i\n",
|
||||||
client.addr << 1, ret);
|
client.addr << 1, ret);
|
||||||
continue;
|
continue;
|
||||||
@ -218,7 +218,7 @@ static int em28xx_probe_sensor_omnivision(struct em28xx *dev)
|
|||||||
reg = 0x1c;
|
reg = 0x1c;
|
||||||
ret = i2c_smbus_read_byte_data(&client, reg);
|
ret = i2c_smbus_read_byte_data(&client, reg);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (ret != -ENODEV)
|
if (ret != -ENXIO)
|
||||||
em28xx_errdev("couldn't read from i2c device 0x%02x: error %i\n",
|
em28xx_errdev("couldn't read from i2c device 0x%02x: error %i\n",
|
||||||
client.addr << 1, ret);
|
client.addr << 1, ret);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user