projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b98102
)
[PATCH] v4l: bttv i2c oops fix
author
Gerd Knorr
<kraxel@suse.de>
Wed, 25 May 2005 19:31:26 +0000
(12:31 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Wed, 25 May 2005 22:31:27 +0000
(15:31 -0700)
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>
drivers/media/video/bttv-i2c.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/media/video/bttv-i2c.c
b/drivers/media/video/bttv-i2c.c
index e3f477dff82782d865d2cd5173308a2381aae230..c2368bc832edc248978cb646218184da59d0b4bc 100644
(file)
--- a/
drivers/media/video/bttv-i2c.c
+++ b/
drivers/media/video/bttv-i2c.c
@@
-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);
}