Skip to content

Commit

Permalink
[PATCH] v4l: bttv i2c oops fix
Browse files Browse the repository at this point in the history
Don't try to access the i2c bus if the register wasn't successful.

Signed-off-by: Gerd Knorr <kraxel@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Gerd Knorr authored and Linus Torvalds committed May 25, 2005
1 parent 1b98102 commit 5daf05f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/bttv-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,9 @@ int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
/* read EEPROM content */
void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr)
{
memset(eedata, 0, 256);
if (0 != btv->i2c_rc)
return;
btv->i2c_client.addr = addr >> 1;
tveeprom_read(&btv->i2c_client, eedata, 256);
}
Expand Down

0 comments on commit 5daf05f

Please sign in to comment.