From: Gerd Knorr Don't try to access the i2c bus if the register wasn't successful. Signed-off-by: Gerd Knorr Signed-off-by: Andrew Morton --- drivers/media/video/bttv-i2c.c | 3 +++ 1 files changed, 3 insertions(+) diff -puN drivers/media/video/bttv-i2c.c~v4l-bttv-i2c-oops-fix drivers/media/video/bttv-i2c.c --- 25/drivers/media/video/bttv-i2c.c~v4l-bttv-i2c-oops-fix 2005-05-25 12:30:23.000000000 -0700 +++ 25-akpm/drivers/media/video/bttv-i2c.c 2005-05-25 12:30:23.000000000 -0700 @@ -363,6 +363,9 @@ int bttv_I2CWrite(struct bttv *btv, unsi /* 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); } _