Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262014AbVEXMUX (ORCPT ); Tue, 24 May 2005 08:20:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262023AbVEXMUX (ORCPT ); Tue, 24 May 2005 08:20:23 -0400 Received: from hirsch.in-berlin.de ([192.109.42.6]:20637 "EHLO hirsch.in-berlin.de") by vger.kernel.org with ESMTP id S262014AbVEXMUQ (ORCPT ); Tue, 24 May 2005 08:20:16 -0400 X-Envelope-From: kraxel@bytesex.org Date: Tue, 24 May 2005 14:17:47 +0200 From: Gerd Knorr To: Andrew Morton , Linux Kernel Mailing List , video4linux list Subject: [patch] v4l: bttv i2c oops fix Message-ID: <20050524121747.GA9440@bytesex> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1133 Lines: 30 Don't try to access the i2c bus if the register wasn't successful. Signed-off-by: Gerd Knorr --- drivers/media/video/bttv-i2c.c | 3 +++ 1 files changed, 3 insertions(+) Index: linux-2.6.12-rc3/drivers/media/video/bttv-i2c.c =================================================================== --- linux-2.6.12-rc3.orig/drivers/media/video/bttv-i2c.c 2005-04-26 12:18:56.000000000 +0200 +++ linux-2.6.12-rc3/drivers/media/video/bttv-i2c.c 2005-05-24 14:17:01.000000000 +0200 @@ -365,6 +365,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); } -- -mm seems unusually stable at present. -- akpm about 2.6.12-rc3-mm3 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/