Skip to content

Commit

Permalink
[PATCH] dvb: fix NULL pointer dereference when loading the budget-av …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Jon Burgess authored and Linus Torvalds committed Sep 28, 2005
1 parent 0b8dd17 commit 88bdcc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/dvb/frontends/tda10021.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ static u8 tda10021_readreg (struct tda10021_state* state, u8 reg)

ret = i2c_transfer (state->i2c, msg, 2);
if (ret != 2)
printk("DVB: TDA10021(%d): %s: readreg error (ret == %i)\n",
state->frontend.dvb->num, __FUNCTION__, ret);
printk("DVB: TDA10021: %s: readreg error (ret == %i)\n",
__FUNCTION__, ret);
return b1[0];
}

Expand Down

0 comments on commit 88bdcc5

Please sign in to comment.