[PATCH] v4l: bttv i2c oops fix

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>

authored by Gerd Knorr and committed by Linus Torvalds 5daf05fb 1b981021

+3
+3
drivers/media/video/bttv-i2c.c
··· 363 363 /* read EEPROM content */ 364 364 void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr) 365 365 { 366 + memset(eedata, 0, 256); 367 + if (0 != btv->i2c_rc) 368 + return; 366 369 btv->i2c_client.addr = addr >> 1; 367 370 tveeprom_read(&btv->i2c_client, eedata, 256); 368 371 }