aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/fintek-cir.c
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2012-11-02 08:13:54 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-21 15:26:08 -0500
commit70ef69915b1fba4ad85aebe530caf156a144c2e5 (patch)
tree76f5b8f79658f5e98ec4373d4e87d7062a67e3f8 /drivers/media/rc/fintek-cir.c
parentd40fbf8d52ae6c9b7fe9d76eeab624afc3a3f1ea (diff)
[media] rc: Make probe cleanup goto labels more verbose
Before, labels were simply numbered. Now, the labels are named after the cleanup action they'll perform (first), based on how the winbond-cir driver does it. This makes the code a bit more clear and makes changes in the ordering of labels easier to review. This change is applied only to the rc drivers that do significant cleanup in their probe functions: ati-remote, ene-ir, fintek-cir, gpio-ir-recv, ite-cir, nuvoton-cir. This commit should not change any code, it just renames goto labels. [mchehab@redhat.com: removed changes at gpio-ir-recv.c, due to merge conflicts] Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/fintek-cir.c')
-rw-r--r--drivers/media/rc/fintek-cir.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index 936c3f79b62c..3d5e57cacf31 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -500,18 +500,18 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id
500 /* input device for IR remote (and tx) */ 500 /* input device for IR remote (and tx) */
501 rdev = rc_allocate_device(); 501 rdev = rc_allocate_device();
502 if (!rdev) 502 if (!rdev)
503 goto failure; 503 goto exit_free_dev_rdev;
504 504
505 ret = -ENODEV; 505 ret = -ENODEV;
506 /* validate pnp resources */ 506 /* validate pnp resources */
507 if (!pnp_port_valid(pdev, 0)) { 507 if (!pnp_port_valid(pdev, 0)) {
508 dev_err(&pdev->dev, "IR PNP Port not valid!\n"); 508 dev_err(&pdev->dev, "IR PNP Port not valid!\n");
509 goto failure; 509 goto exit_free_dev_rdev;
510 } 510 }
511 511
512 if (!pnp_irq_valid(pdev, 0)) { 512 if (!pnp_irq_valid(pdev, 0)) {
513 dev_err(&pdev->dev, "IR PNP IRQ not valid!\n"); 513 dev_err(&pdev->dev, "IR PNP IRQ not valid!\n");
514 goto failure; 514 goto exit_free_dev_rdev;
515 } 515 }
516 516
517 fintek->cir_addr = pnp_port_start(pdev, 0); 517 fintek->cir_addr = pnp_port_start(pdev, 0);
@@ -528,7 +528,7 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id
528 528
529 ret = fintek_hw_detect(fintek); 529 ret = fintek_hw_detect(fintek);
530 if (ret) 530 if (ret)
531 goto failure; 531 goto exit_free_dev_rdev;
532 532
533 /* Initialize CIR & CIR Wake Logical Devices */ 533 /* Initialize CIR & CIR Wake Logical Devices */
534 fintek_config_mode_enable(fintek); 534 fintek_config_mode_enable(fintek);
@@ -561,15 +561,15 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id
561 /* now claim resources */ 561 /* now claim resources */
562 if (!request_region(fintek->cir_addr, 562 if (!request_region(fintek->cir_addr,
563 fintek->cir_port_len, FINTEK_DRIVER_NAME)) 563 fintek->cir_port_len, FINTEK_DRIVER_NAME))
564 goto failure; 564 goto exit_free_dev_rdev;
565 565
566 if (request_irq(fintek->cir_irq, fintek_cir_isr, IRQF_SHARED, 566 if (request_irq(fintek->cir_irq, fintek_cir_isr, IRQF_SHARED,
567 FINTEK_DRIVER_NAME, (void *)fintek)) 567 FINTEK_DRIVER_NAME, (void *)fintek))
568 goto failure2; 568 goto exit_free_cir_addr;
569 569
570 ret = rc_register_device(rdev); 570 ret = rc_register_device(rdev);
571 if (ret) 571 if (ret)
572 goto failure3; 572 goto exit_free_irq;
573 573
574 device_init_wakeup(&pdev->dev, true); 574 device_init_wakeup(&pdev->dev, true);
575 fintek->rdev = rdev; 575 fintek->rdev = rdev;
@@ -579,11 +579,11 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id
579 579
580 return 0; 580 return 0;
581 581
582failure3: 582exit_free_irq:
583 free_irq(fintek->cir_irq, fintek); 583 free_irq(fintek->cir_irq, fintek);
584failure2: 584exit_free_cir_addr:
585 release_region(fintek->cir_addr, fintek->cir_port_len); 585 release_region(fintek->cir_addr, fintek->cir_port_len);
586failure: 586exit_free_dev_rdev:
587 rc_free_device(rdev); 587 rc_free_device(rdev);
588 kfree(fintek); 588 kfree(fintek);
589 589