From e6fd75f2910bfe49cdde58034de9eaddc71d9b77 Mon Sep 17 00:00:00 2001 From: Gerd Knorr Date: Tue, 24 May 2005 12:16:56 +0000 Subject: - bttv: fix i2c oops. --- linux/drivers/media/video/bttv-i2c.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c index 102d5f6df..b9aaede82 100644 --- a/linux/drivers/media/video/bttv-i2c.c +++ b/linux/drivers/media/video/bttv-i2c.c @@ -1,5 +1,5 @@ /* - $Id: bttv-i2c.c,v 1.19 2005/05/22 19:23:39 nsh Exp $ + $Id: bttv-i2c.c,v 1.20 2005/05/24 12:16:56 kraxel Exp $ bttv-i2c.c -- all the i2c code is here @@ -364,6 +364,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); } -- cgit v1.2.3