diff options
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop-pci.c')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-pci.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c index 9bc40bdcc282..f04041702191 100644 --- a/drivers/media/dvb/b2c2/flexcop-pci.c +++ b/drivers/media/dvb/b2c2/flexcop-pci.c | |||
@@ -242,19 +242,16 @@ static int flexcop_pci_dma_init(struct flexcop_pci *fc_pci) | |||
242 | if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[0],FC_DEFAULT_DMA1_BUFSIZE)) != 0) | 242 | if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[0],FC_DEFAULT_DMA1_BUFSIZE)) != 0) |
243 | return ret; | 243 | return ret; |
244 | 244 | ||
245 | if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[1],FC_DEFAULT_DMA2_BUFSIZE)) != 0) | 245 | if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[1],FC_DEFAULT_DMA2_BUFSIZE)) != 0) { |
246 | goto dma1_free; | 246 | flexcop_dma_free(&fc_pci->dma[0]); |
247 | return ret; | ||
248 | } | ||
247 | 249 | ||
248 | flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_MEDIA | FC_SRAM_DEST_NET, FC_SRAM_DEST_TARGET_DMA1); | 250 | flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_MEDIA | FC_SRAM_DEST_NET, FC_SRAM_DEST_TARGET_DMA1); |
249 | flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_CAO | FC_SRAM_DEST_CAI, FC_SRAM_DEST_TARGET_DMA2); | 251 | flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_CAO | FC_SRAM_DEST_CAI, FC_SRAM_DEST_TARGET_DMA2); |
250 | 252 | ||
251 | fc_pci->init_state |= FC_PCI_DMA_INIT; | 253 | fc_pci->init_state |= FC_PCI_DMA_INIT; |
252 | 254 | ||
253 | goto success; | ||
254 | dma1_free: | ||
255 | flexcop_dma_free(&fc_pci->dma[0]); | ||
256 | |||
257 | success: | ||
258 | return ret; | 255 | return ret; |
259 | } | 256 | } |
260 | 257 | ||
@@ -303,7 +300,7 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci) | |||
303 | spin_lock_init(&fc_pci->irq_lock); | 300 | spin_lock_init(&fc_pci->irq_lock); |
304 | 301 | ||
305 | fc_pci->init_state |= FC_PCI_INIT; | 302 | fc_pci->init_state |= FC_PCI_INIT; |
306 | goto success; | 303 | return ret; |
307 | 304 | ||
308 | err_pci_iounmap: | 305 | err_pci_iounmap: |
309 | pci_iounmap(fc_pci->pdev, fc_pci->io_mem); | 306 | pci_iounmap(fc_pci->pdev, fc_pci->io_mem); |
@@ -312,8 +309,6 @@ err_pci_release_regions: | |||
312 | pci_release_regions(fc_pci->pdev); | 309 | pci_release_regions(fc_pci->pdev); |
313 | err_pci_disable_device: | 310 | err_pci_disable_device: |
314 | pci_disable_device(fc_pci->pdev); | 311 | pci_disable_device(fc_pci->pdev); |
315 | |||
316 | success: | ||
317 | return ret; | 312 | return ret; |
318 | } | 313 | } |
319 | 314 | ||
@@ -378,14 +373,14 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
378 | 373 | ||
379 | INIT_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work, fc_pci); | 374 | INIT_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work, fc_pci); |
380 | 375 | ||
381 | goto success; | 376 | return ret; |
377 | |||
382 | err_fc_exit: | 378 | err_fc_exit: |
383 | flexcop_device_exit(fc); | 379 | flexcop_device_exit(fc); |
384 | err_pci_exit: | 380 | err_pci_exit: |
385 | flexcop_pci_exit(fc_pci); | 381 | flexcop_pci_exit(fc_pci); |
386 | err_kfree: | 382 | err_kfree: |
387 | flexcop_device_kfree(fc); | 383 | flexcop_device_kfree(fc); |
388 | success: | ||
389 | return ret; | 384 | return ret; |
390 | } | 385 | } |
391 | 386 | ||