aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-30 14:29:57 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-05-14 01:53:57 -0400
commit09fee5f8211fc0a586187c4a0db7f5f42a4e333f (patch)
tree6af12a771b9483e233138e5f31c2fff6f9f88388 /drivers/media/video
parentd557dab5de82edfe5bab9a1964dfc5cf2b2b6833 (diff)
V4L/DVB (7802): tuner: Failures at tuner_attach were producing OOPS
As reported by Mike Galbraith <efault@gmx.de>: [ 13.666587] TUNER: Unable to find symbol tda829x_probe() [ 13.674638] tuner' 1-004b: chip found @ 0x96 (saa7133[0]) [ 13.691175] DVB: Unable to find symbol tda9887_attach() [ 13.698968] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [ 13.709509] IP: [<ffffffff80302934>] strlcpy+0x11/0x36 [ 13.711135] PGD be167067 PUD be140067 PMD 0 [ 13.711137] Oops: 0000 [1] SMP Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/tuner-core.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index c8cd718675ab..b5dacde023ee 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -340,16 +340,6 @@ static void tuner_i2c_address_check(struct tuner *t)
340 tuner_warn("====================== WARNING! ======================\n"); 340 tuner_warn("====================== WARNING! ======================\n");
341} 341}
342 342
343static void attach_tda829x(struct tuner *t)
344{
345 struct tda829x_config cfg = {
346 .lna_cfg = t->config,
347 .tuner_callback = t->tuner_callback,
348 };
349 dvb_attach(tda829x_attach,
350 &t->fe, t->i2c->adapter, t->i2c->addr, &cfg);
351}
352
353static struct xc5000_config xc5000_cfg; 343static struct xc5000_config xc5000_cfg;
354 344
355static void set_type(struct i2c_client *c, unsigned int type, 345static void set_type(struct i2c_client *c, unsigned int type,
@@ -385,12 +375,19 @@ static void set_type(struct i2c_client *c, unsigned int type,
385 375
386 switch (t->type) { 376 switch (t->type) {
387 case TUNER_MT2032: 377 case TUNER_MT2032:
388 dvb_attach(microtune_attach, 378 if (!dvb_attach(microtune_attach,
389 &t->fe, t->i2c->adapter, t->i2c->addr); 379 &t->fe, t->i2c->adapter, t->i2c->addr))
380 goto attach_failed;
390 break; 381 break;
391 case TUNER_PHILIPS_TDA8290: 382 case TUNER_PHILIPS_TDA8290:
392 { 383 {
393 attach_tda829x(t); 384 struct tda829x_config cfg = {
385 .lna_cfg = t->config,
386 .tuner_callback = t->tuner_callback,
387 };
388 if (!dvb_attach(tda829x_attach, &t->fe, t->i2c->adapter,
389 t->i2c->addr, &cfg))
390 goto attach_failed;
394 break; 391 break;
395 } 392 }
396 case TUNER_TEA5767: 393 case TUNER_TEA5767:
@@ -441,8 +438,9 @@ static void set_type(struct i2c_client *c, unsigned int type,
441 break; 438 break;
442 } 439 }
443 case TUNER_TDA9887: 440 case TUNER_TDA9887:
444 dvb_attach(tda9887_attach, 441 if (!dvb_attach(tda9887_attach,
445 &t->fe, t->i2c->adapter, t->i2c->addr); 442 &t->fe, t->i2c->adapter, t->i2c->addr))
443 goto attach_failed;
446 break; 444 break;
447 case TUNER_XC5000: 445 case TUNER_XC5000:
448 { 446 {