summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-06-15 00:29:36 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-04 07:56:33 -0300
commit6e3a5daa6ee7a0eae3b2161ed4783fee547654c2 (patch)
tree202e8fdee35a959de630d5aa002d2ff0185e5b7c /drivers/media/dvb/dvb-usb
parentffe4ac92ee5a4a0a236b9583c3173902e158e14b (diff)
downloadtalos-obmc-linux-6e3a5daa6ee7a0eae3b2161ed4783fee547654c2.tar.gz
talos-obmc-linux-6e3a5daa6ee7a0eae3b2161ed4783fee547654c2.zip
[media] dvb_usb_v2: try to remove all adapters on exit
It did not removed adapter on error case as .num_adapters_initialized was set after success adapter initialization. It should be safe to try remove all possible adapters in any-case. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb_usb_init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_init.c b/drivers/media/dvb/dvb-usb/dvb_usb_init.c
index e9bb006bb725..cea334331508 100644
--- a/drivers/media/dvb/dvb-usb/dvb_usb_init.c
+++ b/drivers/media/dvb/dvb-usb/dvb_usb_init.c
@@ -294,7 +294,9 @@ static int dvb_usbv2_adapter_exit(struct dvb_usb_device *d)
{
int i;
- for (i = d->num_adapters_initialized - 1; i >= 0; i--) {
+ pr_debug("%s:\n", __func__);
+
+ for (i = MAX_NO_OF_ADAPTER_PER_DEVICE - 1; i >= 0; i--) {
dvb_usbv2_adapter_frontend_exit(&d->adapter[i]);
dvb_usbv2_adapter_dvb_exit(&d->adapter[i]);
dvb_usbv2_adapter_stream_exit(&d->adapter[i]);
OpenPOWER on IntegriCloud