aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index 6170d27b4d90..cf6c30d4e545 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -789,7 +789,7 @@ static int dvb_register(struct cx8802_dev *dev)
789 if (fe0->dvb.frontend) 789 if (fe0->dvb.frontend)
790 fe0->dvb.frontend->ops.i2c_gate_ctrl = NULL; 790 fe0->dvb.frontend->ops.i2c_gate_ctrl = NULL;
791 if (attach_xc3028(0x61, dev) < 0) 791 if (attach_xc3028(0x61, dev) < 0)
792 return -EINVAL; 792 goto frontend_detach;
793 break; 793 break;
794 case CX88_BOARD_PCHDTV_HD3000: 794 case CX88_BOARD_PCHDTV_HD3000:
795 fe0->dvb.frontend = dvb_attach(or51132_attach, &pchdtv_hd3000, 795 fe0->dvb.frontend = dvb_attach(or51132_attach, &pchdtv_hd3000,
@@ -1058,7 +1058,6 @@ static int dvb_register(struct cx8802_dev *dev)
1058 goto frontend_detach; 1058 goto frontend_detach;
1059 core->prev_set_voltage = fe0->dvb.frontend->ops.set_voltage; 1059 core->prev_set_voltage = fe0->dvb.frontend->ops.set_voltage;
1060 fe0->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage; 1060 fe0->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage;
1061
1062 } 1061 }
1063 } 1062 }
1064 break; 1063 break;
@@ -1110,10 +1109,7 @@ static int dvb_register(struct cx8802_dev *dev)
1110 &dev->pci->dev, adapter_nr, mfe_shared); 1109 &dev->pci->dev, adapter_nr, mfe_shared);
1111 1110
1112frontend_detach: 1111frontend_detach:
1113 if (fe0->dvb.frontend) { 1112 videobuf_dvb_dealloc_frontends(&dev->frontends);
1114 dvb_frontend_detach(fe0->dvb.frontend);
1115 fe0->dvb.frontend = NULL;
1116 }
1117 return -EINVAL; 1113 return -EINVAL;
1118} 1114}
1119 1115