aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-22 12:22:04 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-23 05:26:22 -0500
commit3915d367932609f9c0bdc79c525b5dd5a806ab18 (patch)
treef57c0ab4c21e660f300c6074b4bc69025e20241f
parentd4c71d7a385575bebcf0e2a182508e75eeb77b83 (diff)
[media] ttpci: cleanup a bogus smatch warning
Cleanup this bogus smatch warning: drivers/media/pci/ttpci/budget.c:635 frontend_init() warn: missing break? reassigning 'budget->dvb_frontend' And document the fall through logic at the switch(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/pci/ttpci/budget.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/drivers/media/pci/ttpci/budget.c b/drivers/media/pci/ttpci/budget.c
index 9f48100227f1..fb8ede5a1531 100644
--- a/drivers/media/pci/ttpci/budget.c
+++ b/drivers/media/pci/ttpci/budget.c
@@ -615,33 +615,47 @@ static void frontend_init(struct budget *budget)
615 break; 615 break;
616 616
617 case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260)) 617 case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260))
618 budget->dvb_frontend = dvb_attach(s5h1420_attach, &s5h1420_config, &budget->i2c_adap); 618 {
619 if (budget->dvb_frontend) { 619 struct dvb_frontend *fe;
620 budget->dvb_frontend->ops.tuner_ops.set_params = s5h1420_tuner_set_params; 620
621 if (dvb_attach(lnbp21_attach, budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) { 621 fe = dvb_attach(s5h1420_attach, &s5h1420_config, &budget->i2c_adap);
622 if (fe) {
623 fe->ops.tuner_ops.set_params = s5h1420_tuner_set_params;
624 budget->dvb_frontend = fe;
625 if (dvb_attach(lnbp21_attach, fe, &budget->i2c_adap,
626 0, 0) == NULL) {
622 printk("%s: No LNBP21 found!\n", __func__); 627 printk("%s: No LNBP21 found!\n", __func__);
623 goto error_out; 628 goto error_out;
624 } 629 }
625 break; 630 break;
626 } 631 }
627 632 }
633 /* fall through */
628 case 0x1018: // TT Budget-S-1401 (philips tda10086/philips tda8262) 634 case 0x1018: // TT Budget-S-1401 (philips tda10086/philips tda8262)
635 {
636 struct dvb_frontend *fe;
637
629 // gpio2 is connected to CLB - reset it + leave it high 638 // gpio2 is connected to CLB - reset it + leave it high
630 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); 639 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO);
631 msleep(1); 640 msleep(1);
632 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); 641 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI);
633 msleep(1); 642 msleep(1);
634 643
635 budget->dvb_frontend = dvb_attach(tda10086_attach, &tda10086_config, &budget->i2c_adap); 644 fe = dvb_attach(tda10086_attach, &tda10086_config, &budget->i2c_adap);
636 if (budget->dvb_frontend) { 645 if (fe) {
637 if (dvb_attach(tda826x_attach, budget->dvb_frontend, 0x60, &budget->i2c_adap, 0) == NULL) 646 budget->dvb_frontend = fe;
647 if (dvb_attach(tda826x_attach, fe, 0x60,
648 &budget->i2c_adap, 0) == NULL)
638 printk("%s: No tda826x found!\n", __func__); 649 printk("%s: No tda826x found!\n", __func__);
639 if (dvb_attach(lnbp21_attach, budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) { 650 if (dvb_attach(lnbp21_attach, fe,
651 &budget->i2c_adap, 0, 0) == NULL) {
640 printk("%s: No LNBP21 found!\n", __func__); 652 printk("%s: No LNBP21 found!\n", __func__);
641 goto error_out; 653 goto error_out;
642 } 654 }
643 break; 655 break;
644 } 656 }
657 }
658 /* fall through */
645 659
646 case 0x101c: { /* TT S2-1600 */ 660 case 0x101c: { /* TT S2-1600 */
647 const struct stv6110x_devctl *ctl; 661 const struct stv6110x_devctl *ctl;