diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index a1c435b4b1cd..3ebdcd1d83f8 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -769,10 +769,6 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, | |||
769 | struct cx8802_dev *dev; | 769 | struct cx8802_dev *dev; |
770 | struct cx88_core *core; | 770 | struct cx88_core *core; |
771 | int err; | 771 | int err; |
772 | #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) | ||
773 | struct videobuf_dvb_frontend *demod; | ||
774 | int i; | ||
775 | #endif | ||
776 | 772 | ||
777 | /* general setup */ | 773 | /* general setup */ |
778 | core = cx88_core_get(pci_dev); | 774 | core = cx88_core_get(pci_dev); |
@@ -803,15 +799,21 @@ static int __devinit cx8802_probe(struct pci_dev *pci_dev, | |||
803 | mutex_init(&dev->frontends.lock); | 799 | mutex_init(&dev->frontends.lock); |
804 | INIT_LIST_HEAD(&dev->frontends.felist); | 800 | INIT_LIST_HEAD(&dev->frontends.felist); |
805 | 801 | ||
806 | if (core->board.num_frontends) | 802 | if (core->board.num_frontends) { |
807 | printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends); | 803 | struct videobuf_dvb_frontend *fe; |
808 | 804 | int i; | |
809 | for (i = 1; i <= core->board.num_frontends; i++) { | 805 | |
810 | demod = videobuf_dvb_alloc_frontend(&dev->frontends, i); | 806 | printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, |
811 | if(demod == NULL) { | 807 | core->board.num_frontends); |
812 | printk(KERN_ERR "%s() failed to alloc\n", __func__); | 808 | for (i = 1; i <= core->board.num_frontends; i++) { |
813 | err = -ENOMEM; | 809 | fe = videobuf_dvb_alloc_frontend(&dev->frontends, i); |
814 | goto fail_free; | 810 | if(fe == NULL) { |
811 | printk(KERN_ERR "%s() failed to alloc\n", | ||
812 | __func__); | ||
813 | videobuf_dvb_dealloc_frontends(&dev->frontends); | ||
814 | err = -ENOMEM; | ||
815 | goto fail_free; | ||
816 | } | ||
815 | } | 817 | } |
816 | } | 818 | } |
817 | #endif | 819 | #endif |