diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-i2c.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-i2c.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index 3bab56b997fc..2360c61ddca9 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c | |||
@@ -337,9 +337,9 @@ static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned char *eedata, int len) | |||
337 | /* Check if board has eeprom */ | 337 | /* Check if board has eeprom */ |
338 | err = i2c_master_recv(&dev->i2c_client, &buf, 0); | 338 | err = i2c_master_recv(&dev->i2c_client, &buf, 0); |
339 | if (err < 0) { | 339 | if (err < 0) { |
340 | em28xx_errdev("%s: i2c_master_recv failed! err [%d]\n", | 340 | em28xx_errdev("board has no eeprom\n"); |
341 | __func__, err); | 341 | memset(eedata, 0, len); |
342 | return err; | 342 | return -ENODEV; |
343 | } | 343 | } |
344 | 344 | ||
345 | buf = 0; | 345 | buf = 0; |
@@ -609,14 +609,16 @@ int em28xx_i2c_register(struct em28xx *dev) | |||
609 | dev->i2c_client.adapter = &dev->i2c_adap; | 609 | dev->i2c_client.adapter = &dev->i2c_adap; |
610 | 610 | ||
611 | retval = em28xx_i2c_eeprom(dev, dev->eedata, sizeof(dev->eedata)); | 611 | retval = em28xx_i2c_eeprom(dev, dev->eedata, sizeof(dev->eedata)); |
612 | if (retval < 0) { | 612 | if ((retval < 0) && (retval != -ENODEV)) { |
613 | em28xx_errdev("%s: em28xx_i2_eeprom failed! retval [%d]\n", | 613 | em28xx_errdev("%s: em28xx_i2_eeprom failed! retval [%d]\n", |
614 | __func__, retval); | 614 | __func__, retval); |
615 | |||
615 | return retval; | 616 | return retval; |
616 | } | 617 | } |
617 | 618 | ||
618 | if (i2c_scan) | 619 | if (i2c_scan) |
619 | em28xx_do_i2c_scan(dev); | 620 | em28xx_do_i2c_scan(dev); |
621 | |||
620 | return 0; | 622 | return 0; |
621 | } | 623 | } |
622 | 624 | ||