[PATCH] dvb: fix NULL pointer dereference when loading the budget-av module
authorJon Burgess <jburgess@uklinux.net>
Wed, 28 Sep 2005 04:45:26 +0000 (21:45 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Sep 2005 14:46:40 +0000 (07:46 -0700)
commit88bdcc5d5e9a7ea280f99262f48b70aba9d949bf
tree2543d9a35e2ae0e6ff577065edd577ed5b1dfdb1
parent0b8dd17762194ec77066d339e0b2866b0c66b715
[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>
drivers/media/dvb/frontends/tda10021.c