aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/b2c2/flexcop-pci.c19
-rw-r--r--drivers/media/dvb/b2c2/flexcop-usb.c10
-rw-r--r--drivers/media/dvb/b2c2/flexcop.c10
-rw-r--r--drivers/media/dvb/dvb-usb/dtt200u-fe.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-dvb.c7
-rw-r--r--drivers/media/dvb/dvb-usb/vp702x-fe.c4
-rw-r--r--drivers/media/dvb/dvb-usb/vp7045-fe.c4
7 files changed, 20 insertions, 38 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;
254dma1_free:
255 flexcop_dma_free(&fc_pci->dma[0]);
256
257success:
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
308err_pci_iounmap: 305err_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);
313err_pci_disable_device: 310err_pci_disable_device:
314 pci_disable_device(fc_pci->pdev); 311 pci_disable_device(fc_pci->pdev);
315
316success:
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
382err_fc_exit: 378err_fc_exit:
383 flexcop_device_exit(fc); 379 flexcop_device_exit(fc);
384err_pci_exit: 380err_pci_exit:
385 flexcop_pci_exit(fc_pci); 381 flexcop_pci_exit(fc_pci);
386err_kfree: 382err_kfree:
387 flexcop_device_kfree(fc); 383 flexcop_device_kfree(fc);
388success:
389 return ret; 384 return ret;
390} 385}
391 386
diff --git a/drivers/media/dvb/b2c2/flexcop-usb.c b/drivers/media/dvb/b2c2/flexcop-usb.c
index 06ec9fff0ec1..515954f96c9a 100644
--- a/drivers/media/dvb/b2c2/flexcop-usb.c
+++ b/drivers/media/dvb/b2c2/flexcop-usb.c
@@ -433,11 +433,10 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)
433 flexcop_wan_set_speed(fc_usb->fc_dev,FC_WAN_SPEED_8MBITS); 433 flexcop_wan_set_speed(fc_usb->fc_dev,FC_WAN_SPEED_8MBITS);
434 flexcop_sram_ctrl(fc_usb->fc_dev,1,1,1); 434 flexcop_sram_ctrl(fc_usb->fc_dev,1,1,1);
435 435
436 ret = 0; 436 return 0;
437 goto success; 437
438urb_error: 438urb_error:
439 flexcop_usb_transfer_exit(fc_usb); 439 flexcop_usb_transfer_exit(fc_usb);
440success:
441 return ret; 440 return ret;
442} 441}
443 442
@@ -515,15 +514,14 @@ static int flexcop_usb_probe(struct usb_interface *intf,
515 goto err_fc_exit; 514 goto err_fc_exit;
516 515
517 info("%s successfully initialized and connected.",DRIVER_NAME); 516 info("%s successfully initialized and connected.",DRIVER_NAME);
518 ret = 0; 517 return 0;
519 goto success; 518
520err_fc_exit: 519err_fc_exit:
521 flexcop_device_exit(fc); 520 flexcop_device_exit(fc);
522err_usb_exit: 521err_usb_exit:
523 flexcop_usb_exit(fc_usb); 522 flexcop_usb_exit(fc_usb);
524err_kfree: 523err_kfree:
525 flexcop_device_kfree(fc); 524 flexcop_device_kfree(fc);
526success:
527 return ret; 525 return ret;
528} 526}
529 527
diff --git a/drivers/media/dvb/b2c2/flexcop.c b/drivers/media/dvb/b2c2/flexcop.c
index 5c276b3793ea..29ec4183118e 100644
--- a/drivers/media/dvb/b2c2/flexcop.c
+++ b/drivers/media/dvb/b2c2/flexcop.c
@@ -116,7 +116,7 @@ static int flexcop_dvb_init(struct flexcop_device *fc)
116 dvb_net_init(&fc->dvb_adapter, &fc->dvbnet, &fc->demux.dmx); 116 dvb_net_init(&fc->dvb_adapter, &fc->dvbnet, &fc->demux.dmx);
117 117
118 fc->init_state |= FC_STATE_DVB_INIT; 118 fc->init_state |= FC_STATE_DVB_INIT;
119 goto success; 119 return 0;
120 120
121err_connect_frontend: 121err_connect_frontend:
122 fc->demux.dmx.remove_frontend(&fc->demux.dmx,&fc->mem_frontend); 122 fc->demux.dmx.remove_frontend(&fc->demux.dmx,&fc->mem_frontend);
@@ -129,9 +129,6 @@ err_dmx_dev:
129err_dmx: 129err_dmx:
130 dvb_unregister_adapter(&fc->dvb_adapter); 130 dvb_unregister_adapter(&fc->dvb_adapter);
131 return ret; 131 return ret;
132
133success:
134 return 0;
135} 132}
136 133
137static void flexcop_dvb_exit(struct flexcop_device *fc) 134static void flexcop_dvb_exit(struct flexcop_device *fc)
@@ -279,11 +276,10 @@ int flexcop_device_initialize(struct flexcop_device *fc)
279 276
280 flexcop_device_name(fc,"initialization of","complete"); 277 flexcop_device_name(fc,"initialization of","complete");
281 278
282 ret = 0; 279 return 0;
283 goto success; 280
284error: 281error:
285 flexcop_device_exit(fc); 282 flexcop_device_exit(fc);
286success:
287 return ret; 283 return ret;
288} 284}
289EXPORT_SYMBOL(flexcop_device_initialize); 285EXPORT_SYMBOL(flexcop_device_initialize);
diff --git a/drivers/media/dvb/dvb-usb/dtt200u-fe.c b/drivers/media/dvb/dvb-usb/dtt200u-fe.c
index cd21ddbfd054..2df6da2b54f8 100644
--- a/drivers/media/dvb/dvb-usb/dtt200u-fe.c
+++ b/drivers/media/dvb/dvb-usb/dtt200u-fe.c
@@ -168,11 +168,9 @@ struct dvb_frontend* dtt200u_fe_attach(struct dvb_usb_device *d)
168 state->frontend.ops = &state->ops; 168 state->frontend.ops = &state->ops;
169 state->frontend.demodulator_priv = state; 169 state->frontend.demodulator_priv = state;
170 170
171 goto success; 171 return &state->frontend;
172error: 172error:
173 return NULL; 173 return NULL;
174success:
175 return &state->frontend;
176} 174}
177 175
178static struct dvb_frontend_ops dtt200u_fe_ops = { 176static struct dvb_frontend_ops dtt200u_fe_ops = {
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
index 500896d02d5a..2517b228381d 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
@@ -121,16 +121,15 @@ int dvb_usb_dvb_init(struct dvb_usb_device *d)
121 121
122 dvb_net_init(&d->dvb_adap, &d->dvb_net, &d->demux.dmx); 122 dvb_net_init(&d->dvb_adap, &d->dvb_net, &d->demux.dmx);
123 123
124 goto success; 124 d->state |= DVB_USB_STATE_DVB;
125 return 0;
126
125err_dmx_dev: 127err_dmx_dev:
126 dvb_dmx_release(&d->demux); 128 dvb_dmx_release(&d->demux);
127err_dmx: 129err_dmx:
128 dvb_unregister_adapter(&d->dvb_adap); 130 dvb_unregister_adapter(&d->dvb_adap);
129err: 131err:
130 return ret; 132 return ret;
131success:
132 d->state |= DVB_USB_STATE_DVB;
133 return 0;
134} 133}
135 134
136int dvb_usb_dvb_exit(struct dvb_usb_device *d) 135int dvb_usb_dvb_exit(struct dvb_usb_device *d)
diff --git a/drivers/media/dvb/dvb-usb/vp702x-fe.c b/drivers/media/dvb/dvb-usb/vp702x-fe.c
index 2a89f8c5da99..9d26f46de091 100644
--- a/drivers/media/dvb/dvb-usb/vp702x-fe.c
+++ b/drivers/media/dvb/dvb-usb/vp702x-fe.c
@@ -293,11 +293,9 @@ struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d)
293 s->lnb_buf[1] = SET_LNB_POWER; 293 s->lnb_buf[1] = SET_LNB_POWER;
294 s->lnb_buf[3] = 0xff; /* 0=tone burst, 2=data burst, ff=off */ 294 s->lnb_buf[3] = 0xff; /* 0=tone burst, 2=data burst, ff=off */
295 295
296 goto success; 296 return &s->fe;
297error: 297error:
298 return NULL; 298 return NULL;
299success:
300 return &s->fe;
301} 299}
302 300
303 301
diff --git a/drivers/media/dvb/dvb-usb/vp7045-fe.c b/drivers/media/dvb/dvb-usb/vp7045-fe.c
index 9999336aeeb6..e98e5a517f5a 100644
--- a/drivers/media/dvb/dvb-usb/vp7045-fe.c
+++ b/drivers/media/dvb/dvb-usb/vp7045-fe.c
@@ -155,11 +155,9 @@ struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d)
155 s->fe.ops = &s->ops; 155 s->fe.ops = &s->ops;
156 s->fe.demodulator_priv = s; 156 s->fe.demodulator_priv = s;
157 157
158 goto success; 158 return &s->fe;
159error: 159error:
160 return NULL; 160 return NULL;
161success:
162 return &s->fe;
163} 161}
164 162
165 163