aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Burgess <jburgess@uklinux.net>2005-09-28 00:45:26 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-28 10:46:40 -0400
commit88bdcc5d5e9a7ea280f99262f48b70aba9d949bf (patch)
tree2543d9a35e2ae0e6ff577065edd577ed5b1dfdb1
parent0b8dd17762194ec77066d339e0b2866b0c66b715 (diff)
[PATCH] dvb: fix NULL pointer dereference when loading the budget-av module
Ralph Metzler wrote: > AFAIR, there is a bug in tda10021.c in tda10021_readreg() which > references state->frontend.dvb->num > This is fatal if the frontend is not at the probed address and thus > not yet registered (no dvb entry set yet -> NULL pointer ...). The attached patch should get rid of the oops. Signed-off-by: Jon Burgess <jburgess@uklinux.net> Cc: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/media/dvb/frontends/tda10021.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c
index 87d5f4d8790f..eaf130e666d8 100644
--- a/drivers/media/dvb/frontends/tda10021.c
+++ b/drivers/media/dvb/frontends/tda10021.c
@@ -100,8 +100,8 @@ static u8 tda10021_readreg (struct tda10021_state* state, u8 reg)
100 100
101 ret = i2c_transfer (state->i2c, msg, 2); 101 ret = i2c_transfer (state->i2c, msg, 2);
102 if (ret != 2) 102 if (ret != 2)
103 printk("DVB: TDA10021(%d): %s: readreg error (ret == %i)\n", 103 printk("DVB: TDA10021: %s: readreg error (ret == %i)\n",
104 state->frontend.dvb->num, __FUNCTION__, ret); 104 __FUNCTION__, ret);
105 return b1[0]; 105 return b1[0];
106} 106}
107 107