summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorDarron Broad <darron@kewl.org>2008-10-21 11:47:50 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 14:32:12 -0200
commitbecd43056c8f65e3b8510b1a8a0940683ee185a2 (patch)
treebb68b8556108a23a5aaea2299f6505dd953594fa /drivers/media
parent878595f6e7225c996523965b61ce3fe29addca9d (diff)
downloadtalos-op-linux-becd43056c8f65e3b8510b1a8a0940683ee185a2.tar.gz
talos-op-linux-becd43056c8f65e3b8510b1a8a0940683ee185a2.zip
V4L/DVB (9336): cx88: always de-alloc frontends on fault condition
De-alloc frontends on fault condition. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-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)
if (fe0->dvb.frontend)
fe0->dvb.frontend->ops.i2c_gate_ctrl = NULL;
if (attach_xc3028(0x61, dev) < 0)
- return -EINVAL;
+ goto frontend_detach;
break;
case CX88_BOARD_PCHDTV_HD3000:
fe0->dvb.frontend = dvb_attach(or51132_attach, &pchdtv_hd3000,
@@ -1058,7 +1058,6 @@ static int dvb_register(struct cx8802_dev *dev)
goto frontend_detach;
core->prev_set_voltage = fe0->dvb.frontend->ops.set_voltage;
fe0->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage;
-
}
}
break;
@@ -1110,10 +1109,7 @@ static int dvb_register(struct cx8802_dev *dev)
&dev->pci->dev, adapter_nr, mfe_shared);
frontend_detach:
- if (fe0->dvb.frontend) {
- dvb_frontend_detach(fe0->dvb.frontend);
- fe0->dvb.frontend = NULL;
- }
+ videobuf_dvb_dealloc_frontends(&dev->frontends);
return -EINVAL;
}
OpenPOWER on IntegriCloud