summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-05-25 21:31:17 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2008-05-25 21:31:17 -0400
commit6c704b27377af4d7802223b3e7a7ec4f154fb158 (patch)
tree61b068157b40802438e94796e21ec0b3cb395857
parenta0d9e3d53e8d1fdcb98dc8c106e790e09ed703f3 (diff)
downloadmediapointer-dvb-s2-6c704b27377af4d7802223b3e7a7ec4f154fb158.tar.gz
mediapointer-dvb-s2-6c704b27377af4d7802223b3e7a7ec4f154fb158.tar.bz2
tuner-simple: fix tuner_warn() induced kernel oops in simple_tuner_attach()
From: Andy Walls <awalls@radix.net> The tuner_warn() macro relies on the local variable "priv" to be a valid pointer. There was a case in simple_tuner_attach() where this cannot be the case yet, so tuner_warn() would dereference a NULL "priv" pointer. Changed the tuner_warn() to a printk() with the originally intended output format. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
-rw-r--r--linux/drivers/media/common/tuners/tuner-simple.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/common/tuners/tuner-simple.c b/linux/drivers/media/common/tuners/tuner-simple.c
index 29c14a4c6..c9d70e4b2 100644
--- a/linux/drivers/media/common/tuners/tuner-simple.c
+++ b/linux/drivers/media/common/tuners/tuner-simple.c
@@ -1053,8 +1053,10 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
fe->ops.i2c_gate_ctrl(fe, 1);
if (1 != i2c_transfer(i2c_adap, &msg, 1))
- tuner_warn("unable to probe %s, proceeding anyway.",
- tuners[type].name);
+ printk(KERN_WARNING "tuner-simple %d-%04x: "
+ "unable to probe %s, proceeding anyway.",
+ i2c_adapter_id(i2c_adap), i2c_addr,
+ tuners[type].name);
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);