Commit ed3da2bf authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] cx23885-dvb: Fix some issues at the DVB error handling

X-Patchwork-Delegate: m.chehab@samsung.com
As pointed by smatch:
	drivers/media/pci/cx23885/cx23885-dvb.c:1066 dvb_register() error: we previously assumed 'fe0->dvb.frontend' could be null (see line 1060)
	drivers/media/pci/cx23885/cx23885-dvb.c:1990 cx23885_dvb_register() error: we previously assumed 'fe0' could be null (see line 1975)

What happens is that the error handling logic when a frontend
register fails sometimes keep doing the work, as if it didn't
fail.

This could potentially cause an OOPS. So, simplify the logic
a little bit and return an error if frontend fails before
trying to setup VB2 queue.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 61b103e8
...@@ -1058,11 +1058,11 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1058,11 +1058,11 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(s5h1409_attach, fe0->dvb.frontend = dvb_attach(s5h1409_attach,
&hauppauge_generic_config, &hauppauge_generic_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(mt2131_attach, fe0->dvb.frontend, break;
&i2c_bus->i2c_adap, dvb_attach(mt2131_attach, fe0->dvb.frontend,
&hauppauge_generic_tunerconfig, 0); &i2c_bus->i2c_adap,
} &hauppauge_generic_tunerconfig, 0);
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR1270: case CX23885_BOARD_HAUPPAUGE_HVR1270:
case CX23885_BOARD_HAUPPAUGE_HVR1275: case CX23885_BOARD_HAUPPAUGE_HVR1275:
...@@ -1070,11 +1070,11 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1070,11 +1070,11 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(lgdt3305_attach, fe0->dvb.frontend = dvb_attach(lgdt3305_attach,
&hauppauge_lgdt3305_config, &hauppauge_lgdt3305_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(tda18271_attach, fe0->dvb.frontend, break;
0x60, &dev->i2c_bus[1].i2c_adap, dvb_attach(tda18271_attach, fe0->dvb.frontend,
&hauppauge_hvr127x_config); 0x60, &dev->i2c_bus[1].i2c_adap,
} &hauppauge_hvr127x_config);
if (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1275) if (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1275)
cx23885_set_frontend_hook(port, fe0->dvb.frontend); cx23885_set_frontend_hook(port, fe0->dvb.frontend);
break; break;
...@@ -1084,11 +1084,12 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1084,11 +1084,12 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(s5h1411_attach, fe0->dvb.frontend = dvb_attach(s5h1411_attach,
&hcw_s5h1411_config, &hcw_s5h1411_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(tda18271_attach, fe0->dvb.frontend, break;
0x60, &dev->i2c_bus[1].i2c_adap,
&hauppauge_tda18271_config); dvb_attach(tda18271_attach, fe0->dvb.frontend,
} 0x60, &dev->i2c_bus[1].i2c_adap,
&hauppauge_tda18271_config);
tda18271_attach(&dev->ts1.analog_fe, tda18271_attach(&dev->ts1.analog_fe,
0x60, &dev->i2c_bus[1].i2c_adap, 0x60, &dev->i2c_bus[1].i2c_adap,
...@@ -1103,14 +1104,15 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1103,14 +1104,15 @@ static int dvb_register(struct cx23885_tsport *port)
dvb_attach(s5h1409_attach, dvb_attach(s5h1409_attach,
&hauppauge_ezqam_config, &hauppauge_ezqam_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(tda829x_attach, fe0->dvb.frontend, break;
&dev->i2c_bus[1].i2c_adap, 0x42,
&tda829x_no_probe); dvb_attach(tda829x_attach, fe0->dvb.frontend,
dvb_attach(tda18271_attach, fe0->dvb.frontend, &dev->i2c_bus[1].i2c_adap, 0x42,
0x60, &dev->i2c_bus[1].i2c_adap, &tda829x_no_probe);
&hauppauge_tda18271_config); dvb_attach(tda18271_attach, fe0->dvb.frontend,
} 0x60, &dev->i2c_bus[1].i2c_adap,
&hauppauge_tda18271_config);
break; break;
case 0: case 0:
default: default:
...@@ -1118,11 +1120,11 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1118,11 +1120,11 @@ static int dvb_register(struct cx23885_tsport *port)
dvb_attach(s5h1409_attach, dvb_attach(s5h1409_attach,
&hauppauge_generic_config, &hauppauge_generic_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) if (fe0->dvb.frontend == NULL)
dvb_attach(mt2131_attach, fe0->dvb.frontend, break;
&i2c_bus->i2c_adap, dvb_attach(mt2131_attach, fe0->dvb.frontend,
&hauppauge_generic_tunerconfig, 0); &i2c_bus->i2c_adap,
break; &hauppauge_generic_tunerconfig, 0);
} }
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR1800lp: case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
...@@ -1130,32 +1132,33 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1130,32 +1132,33 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(s5h1409_attach, fe0->dvb.frontend = dvb_attach(s5h1409_attach,
&hauppauge_hvr1800lp_config, &hauppauge_hvr1800lp_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(mt2131_attach, fe0->dvb.frontend, break;
&i2c_bus->i2c_adap, dvb_attach(mt2131_attach, fe0->dvb.frontend,
&hauppauge_generic_tunerconfig, 0); &i2c_bus->i2c_adap,
} &hauppauge_generic_tunerconfig, 0);
break; break;
case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP: case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP:
i2c_bus = &dev->i2c_bus[0]; i2c_bus = &dev->i2c_bus[0];
fe0->dvb.frontend = dvb_attach(lgdt330x_attach, fe0->dvb.frontend = dvb_attach(lgdt330x_attach,
&fusionhdtv_5_express, &fusionhdtv_5_express,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(simple_tuner_attach, fe0->dvb.frontend, break;
&i2c_bus->i2c_adap, 0x61, dvb_attach(simple_tuner_attach, fe0->dvb.frontend,
TUNER_LG_TDVS_H06XF); &i2c_bus->i2c_adap, 0x61,
} TUNER_LG_TDVS_H06XF);
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR1500Q: case CX23885_BOARD_HAUPPAUGE_HVR1500Q:
i2c_bus = &dev->i2c_bus[1]; i2c_bus = &dev->i2c_bus[1];
fe0->dvb.frontend = dvb_attach(s5h1409_attach, fe0->dvb.frontend = dvb_attach(s5h1409_attach,
&hauppauge_hvr1500q_config, &hauppauge_hvr1500q_config,
&dev->i2c_bus[0].i2c_adap); &dev->i2c_bus[0].i2c_adap);
if (fe0->dvb.frontend != NULL) if (fe0->dvb.frontend == NULL)
dvb_attach(xc5000_attach, fe0->dvb.frontend, break;
&i2c_bus->i2c_adap, dvb_attach(xc5000_attach, fe0->dvb.frontend,
&hauppauge_hvr1500q_tunerconfig); &i2c_bus->i2c_adap,
&hauppauge_hvr1500q_tunerconfig);
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR1500: case CX23885_BOARD_HAUPPAUGE_HVR1500:
i2c_bus = &dev->i2c_bus[1]; i2c_bus = &dev->i2c_bus[1];
...@@ -1186,14 +1189,14 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1186,14 +1189,14 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(tda10048_attach, fe0->dvb.frontend = dvb_attach(tda10048_attach,
&hauppauge_hvr1200_config, &hauppauge_hvr1200_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(tda829x_attach, fe0->dvb.frontend, break;
&dev->i2c_bus[1].i2c_adap, 0x42, dvb_attach(tda829x_attach, fe0->dvb.frontend,
&tda829x_no_probe); &dev->i2c_bus[1].i2c_adap, 0x42,
dvb_attach(tda18271_attach, fe0->dvb.frontend, &tda829x_no_probe);
0x60, &dev->i2c_bus[1].i2c_adap, dvb_attach(tda18271_attach, fe0->dvb.frontend,
&hauppauge_hvr1200_tuner_config); 0x60, &dev->i2c_bus[1].i2c_adap,
} &hauppauge_hvr1200_tuner_config);
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR1210: case CX23885_BOARD_HAUPPAUGE_HVR1210:
i2c_bus = &dev->i2c_bus[0]; i2c_bus = &dev->i2c_bus[0];
...@@ -1452,12 +1455,10 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1452,12 +1455,10 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(lgs8gxx_attach, fe0->dvb.frontend = dvb_attach(lgs8gxx_attach,
&mygica_x8506_lgs8gl5_config, &mygica_x8506_lgs8gl5_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(xc5000_attach, break;
fe0->dvb.frontend, dvb_attach(xc5000_attach, fe0->dvb.frontend,
&i2c_bus2->i2c_adap, &i2c_bus2->i2c_adap, &mygica_x8506_xc5000_config);
&mygica_x8506_xc5000_config);
}
cx23885_set_frontend_hook(port, fe0->dvb.frontend); cx23885_set_frontend_hook(port, fe0->dvb.frontend);
break; break;
case CX23885_BOARD_MYGICA_X8507: case CX23885_BOARD_MYGICA_X8507:
...@@ -1466,12 +1467,12 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1466,12 +1467,12 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(mb86a20s_attach, fe0->dvb.frontend = dvb_attach(mb86a20s_attach,
&mygica_x8507_mb86a20s_config, &mygica_x8507_mb86a20s_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(xc5000_attach, break;
fe0->dvb.frontend,
&i2c_bus2->i2c_adap, dvb_attach(xc5000_attach, fe0->dvb.frontend,
&mygica_x8507_xc5000_config); &i2c_bus2->i2c_adap,
} &mygica_x8507_xc5000_config);
cx23885_set_frontend_hook(port, fe0->dvb.frontend); cx23885_set_frontend_hook(port, fe0->dvb.frontend);
break; break;
case CX23885_BOARD_MAGICPRO_PROHDTVE2: case CX23885_BOARD_MAGICPRO_PROHDTVE2:
...@@ -1480,12 +1481,11 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1480,12 +1481,11 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(lgs8gxx_attach, fe0->dvb.frontend = dvb_attach(lgs8gxx_attach,
&magicpro_prohdtve2_lgs8g75_config, &magicpro_prohdtve2_lgs8g75_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(xc5000_attach, break;
fe0->dvb.frontend, dvb_attach(xc5000_attach, fe0->dvb.frontend,
&i2c_bus2->i2c_adap, &i2c_bus2->i2c_adap,
&magicpro_prohdtve2_xc5000_config); &magicpro_prohdtve2_xc5000_config);
}
cx23885_set_frontend_hook(port, fe0->dvb.frontend); cx23885_set_frontend_hook(port, fe0->dvb.frontend);
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR1850: case CX23885_BOARD_HAUPPAUGE_HVR1850:
...@@ -1493,10 +1493,11 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1493,10 +1493,11 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(s5h1411_attach, fe0->dvb.frontend = dvb_attach(s5h1411_attach,
&hcw_s5h1411_config, &hcw_s5h1411_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) if (fe0->dvb.frontend == NULL)
dvb_attach(tda18271_attach, fe0->dvb.frontend, break;
0x60, &dev->i2c_bus[0].i2c_adap, dvb_attach(tda18271_attach, fe0->dvb.frontend,
&hauppauge_tda18271_config); 0x60, &dev->i2c_bus[0].i2c_adap,
&hauppauge_tda18271_config);
tda18271_attach(&dev->ts1.analog_fe, tda18271_attach(&dev->ts1.analog_fe,
0x60, &dev->i2c_bus[1].i2c_adap, 0x60, &dev->i2c_bus[1].i2c_adap,
...@@ -1508,10 +1509,11 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1508,10 +1509,11 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(s5h1411_attach, fe0->dvb.frontend = dvb_attach(s5h1411_attach,
&hcw_s5h1411_config, &hcw_s5h1411_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) if (fe0->dvb.frontend == NULL)
dvb_attach(tda18271_attach, fe0->dvb.frontend, break;
0x60, &dev->i2c_bus[0].i2c_adap, dvb_attach(tda18271_attach, fe0->dvb.frontend,
&hauppauge_tda18271_config); 0x60, &dev->i2c_bus[0].i2c_adap,
&hauppauge_tda18271_config);
break; break;
case CX23885_BOARD_MYGICA_X8558PRO: case CX23885_BOARD_MYGICA_X8558PRO:
switch (port->nr) { switch (port->nr) {
...@@ -1521,12 +1523,11 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1521,12 +1523,11 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(atbm8830_attach, fe0->dvb.frontend = dvb_attach(atbm8830_attach,
&mygica_x8558pro_atbm8830_cfg1, &mygica_x8558pro_atbm8830_cfg1,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(max2165_attach, break;
fe0->dvb.frontend, dvb_attach(max2165_attach, fe0->dvb.frontend,
&i2c_bus->i2c_adap, &i2c_bus->i2c_adap,
&mygic_x8558pro_max2165_cfg1); &mygic_x8558pro_max2165_cfg1);
}
break; break;
/* port C */ /* port C */
case 2: case 2:
...@@ -1534,13 +1535,11 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1534,13 +1535,11 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(atbm8830_attach, fe0->dvb.frontend = dvb_attach(atbm8830_attach,
&mygica_x8558pro_atbm8830_cfg2, &mygica_x8558pro_atbm8830_cfg2,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(max2165_attach, break;
fe0->dvb.frontend, dvb_attach(max2165_attach, fe0->dvb.frontend,
&i2c_bus->i2c_adap, &i2c_bus->i2c_adap,
&mygic_x8558pro_max2165_cfg2); &mygic_x8558pro_max2165_cfg2);
}
break;
} }
break; break;
case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF: case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF:
...@@ -1552,15 +1551,15 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1552,15 +1551,15 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(stv0367ter_attach, fe0->dvb.frontend = dvb_attach(stv0367ter_attach,
&netup_stv0367_config[port->nr - 1], &netup_stv0367_config[port->nr - 1],
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
if (NULL == dvb_attach(xc5000_attach, break;
fe0->dvb.frontend, if (NULL == dvb_attach(xc5000_attach, fe0->dvb.frontend,
&i2c_bus->i2c_adap, &i2c_bus->i2c_adap,
&netup_xc5000_config[port->nr - 1])) &netup_xc5000_config[port->nr - 1]))
goto frontend_detach; goto frontend_detach;
/* load xc5000 firmware */ /* load xc5000 firmware */
fe0->dvb.frontend->ops.tuner_ops.init(fe0->dvb.frontend); fe0->dvb.frontend->ops.tuner_ops.init(fe0->dvb.frontend);
}
/* MFE frontend 2 */ /* MFE frontend 2 */
fe1 = vb2_dvb_get_frontend(&port->frontends, 2); fe1 = vb2_dvb_get_frontend(&port->frontends, 2);
if (fe1 == NULL) if (fe1 == NULL)
...@@ -1569,14 +1568,15 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1569,14 +1568,15 @@ static int dvb_register(struct cx23885_tsport *port)
fe1->dvb.frontend = dvb_attach(stv0367cab_attach, fe1->dvb.frontend = dvb_attach(stv0367cab_attach,
&netup_stv0367_config[port->nr - 1], &netup_stv0367_config[port->nr - 1],
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe1->dvb.frontend != NULL) { if (fe1->dvb.frontend == NULL)
fe1->dvb.frontend->id = 1; break;
if (NULL == dvb_attach(xc5000_attach,
fe1->dvb.frontend, fe1->dvb.frontend->id = 1;
&i2c_bus->i2c_adap, if (NULL == dvb_attach(xc5000_attach,
&netup_xc5000_config[port->nr - 1])) fe1->dvb.frontend,
goto frontend_detach; &i2c_bus->i2c_adap,
} &netup_xc5000_config[port->nr - 1]))
goto frontend_detach;
break; break;
case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL: case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
i2c_bus = &dev->i2c_bus[0]; i2c_bus = &dev->i2c_bus[0];
...@@ -1588,26 +1588,26 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1588,26 +1588,26 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(drxk_attach, fe0->dvb.frontend = dvb_attach(drxk_attach,
&terratec_drxk_config[0], &terratec_drxk_config[0],
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
if (!dvb_attach(mt2063_attach, break;
fe0->dvb.frontend, if (!dvb_attach(mt2063_attach,
&terratec_mt2063_config[0], fe0->dvb.frontend,
&i2c_bus2->i2c_adap)) &terratec_mt2063_config[0],
goto frontend_detach; &i2c_bus2->i2c_adap))
} goto frontend_detach;
break; break;
/* port c */ /* port c */
case 2: case 2:
fe0->dvb.frontend = dvb_attach(drxk_attach, fe0->dvb.frontend = dvb_attach(drxk_attach,
&terratec_drxk_config[1], &terratec_drxk_config[1],
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
if (!dvb_attach(mt2063_attach, break;
fe0->dvb.frontend, if (!dvb_attach(mt2063_attach,
&terratec_mt2063_config[1], fe0->dvb.frontend,
&i2c_bus2->i2c_adap)) &terratec_mt2063_config[1],
goto frontend_detach; &i2c_bus2->i2c_adap))
} goto frontend_detach;
break; break;
} }
break; break;
...@@ -1617,10 +1617,10 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1617,10 +1617,10 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(ds3000_attach, fe0->dvb.frontend = dvb_attach(ds3000_attach,
&tevii_ds3000_config, &tevii_ds3000_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
dvb_attach(ts2020_attach, fe0->dvb.frontend, break;
&tevii_ts2020_config, &i2c_bus->i2c_adap); dvb_attach(ts2020_attach, fe0->dvb.frontend,
} &tevii_ts2020_config, &i2c_bus->i2c_adap);
break; break;
case CX23885_BOARD_PROF_8000: case CX23885_BOARD_PROF_8000:
i2c_bus = &dev->i2c_bus[0]; i2c_bus = &dev->i2c_bus[0];
...@@ -1629,15 +1629,15 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1629,15 +1629,15 @@ static int dvb_register(struct cx23885_tsport *port)
&prof_8000_stv090x_config, &prof_8000_stv090x_config,
&i2c_bus->i2c_adap, &i2c_bus->i2c_adap,
STV090x_DEMODULATOR_0); STV090x_DEMODULATOR_0);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
if (!dvb_attach(stb6100_attach, break;
fe0->dvb.frontend, if (!dvb_attach(stb6100_attach,
&prof_8000_stb6100_config, fe0->dvb.frontend,
&i2c_bus->i2c_adap)) &prof_8000_stb6100_config,
goto frontend_detach; &i2c_bus->i2c_adap))
goto frontend_detach;
fe0->dvb.frontend->ops.set_voltage = p8000_set_voltage; fe0->dvb.frontend->ops.set_voltage = p8000_set_voltage;
}
break; break;
case CX23885_BOARD_HAUPPAUGE_HVR4400: case CX23885_BOARD_HAUPPAUGE_HVR4400:
i2c_bus = &dev->i2c_bus[0]; i2c_bus = &dev->i2c_bus[0];
...@@ -1648,26 +1648,26 @@ static int dvb_register(struct cx23885_tsport *port) ...@@ -1648,26 +1648,26 @@ static int dvb_register(struct cx23885_tsport *port)
fe0->dvb.frontend = dvb_attach(tda10071_attach, fe0->dvb.frontend = dvb_attach(tda10071_attach,
&hauppauge_tda10071_config, &hauppauge_tda10071_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
if (!dvb_attach(a8293_attach, fe0->dvb.frontend, break;
&i2c_bus->i2c_adap, if (!dvb_attach(a8293_attach, fe0->dvb.frontend,
&hauppauge_a8293_config)) &i2c_bus->i2c_adap,
goto frontend_detach; &hauppauge_a8293_config))
} goto frontend_detach;
break; break;
/* port c */ /* port c */
case 2: case 2:
fe0->dvb.frontend = dvb_attach(si2165_attach, fe0->dvb.frontend = dvb_attach(si2165_attach,
&hauppauge_hvr4400_si2165_config, &hauppauge_hvr4400_si2165_config,
&i2c_bus->i2c_adap); &i2c_bus->i2c_adap);
if (fe0->dvb.frontend != NULL) { if (fe0->dvb.frontend == NULL)
fe0->dvb.frontend->ops.i2c_gate_ctrl = NULL; break;
if (!dvb_attach(tda18271_attach, fe0->dvb.frontend->ops.i2c_gate_ctrl = NULL;
fe0->dvb.frontend, if (!dvb_attach(tda18271_attach,
0x60, &i2c_bus2->i2c_adap, fe0->dvb.frontend,
&hauppauge_hvr4400_tuner_config)) 0x60, &i2c_bus2->i2c_adap,
goto frontend_detach; &hauppauge_hvr4400_tuner_config))
} goto frontend_detach;
break; break;
} }
break; break;
...@@ -2032,7 +2032,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port) ...@@ -2032,7 +2032,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port)
fe0 = vb2_dvb_get_frontend(&port->frontends, i); fe0 = vb2_dvb_get_frontend(&port->frontends, i);
if (!fe0) if (!fe0)
err = -EINVAL; return -EINVAL;
dprintk(1, "%s\n", __func__); dprintk(1, "%s\n", __func__);
dprintk(1, " ->probed by Card=%d Name=%s, PCI %02x:%02x\n", dprintk(1, " ->probed by Card=%d Name=%s, PCI %02x:%02x\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment