aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ite-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/ite-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/ite-cir.c')
-rw-r--r--drivers/media/rc/ite-cir.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 5e5a7f2b8184..8e0e661b5ef9 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1472,7 +1472,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
1472 /* input device for IR remote (and tx) */ 1472 /* input device for IR remote (and tx) */
1473 rdev = rc_allocate_device(); 1473 rdev = rc_allocate_device();
1474 if (!rdev) 1474 if (!rdev)
1475 goto failure; 1475 goto exit_free_dev_rdev;
1476 itdev->rdev = rdev; 1476 itdev->rdev = rdev;
1477 1477
1478 ret = -ENODEV; 1478 ret = -ENODEV;
@@ -1498,12 +1498,12 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
1498 if (!pnp_port_valid(pdev, io_rsrc_no) || 1498 if (!pnp_port_valid(pdev, io_rsrc_no) ||
1499 pnp_port_len(pdev, io_rsrc_no) != dev_desc->io_region_size) { 1499 pnp_port_len(pdev, io_rsrc_no) != dev_desc->io_region_size) {
1500 dev_err(&pdev->dev, "IR PNP Port not valid!\n"); 1500 dev_err(&pdev->dev, "IR PNP Port not valid!\n");
1501 goto failure; 1501 goto exit_free_dev_rdev;
1502 } 1502 }
1503 1503
1504 if (!pnp_irq_valid(pdev, 0)) { 1504 if (!pnp_irq_valid(pdev, 0)) {
1505 dev_err(&pdev->dev, "PNP IRQ not valid!\n"); 1505 dev_err(&pdev->dev, "PNP IRQ not valid!\n");
1506 goto failure; 1506 goto exit_free_dev_rdev;
1507 } 1507 }
1508 1508
1509 /* store resource values */ 1509 /* store resource values */
@@ -1595,25 +1595,25 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id
1595 /* now claim resources */ 1595 /* now claim resources */
1596 if (!request_region(itdev->cir_addr, 1596 if (!request_region(itdev->cir_addr,
1597 dev_desc->io_region_size, ITE_DRIVER_NAME)) 1597 dev_desc->io_region_size, ITE_DRIVER_NAME))
1598 goto failure; 1598 goto exit_free_dev_rdev;
1599 1599
1600 if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED, 1600 if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED,
1601 ITE_DRIVER_NAME, (void *)itdev)) 1601 ITE_DRIVER_NAME, (void *)itdev))
1602 goto failure2; 1602 goto exit_release_cir_addr;
1603 1603
1604 ret = rc_register_device(rdev); 1604 ret = rc_register_device(rdev);
1605 if (ret) 1605 if (ret)
1606 goto failure3; 1606 goto exit_free_irq;
1607 1607
1608 ite_pr(KERN_NOTICE, "driver has been successfully loaded\n"); 1608 ite_pr(KERN_NOTICE, "driver has been successfully loaded\n");
1609 1609
1610 return 0; 1610 return 0;
1611 1611
1612failure3: 1612exit_free_irq:
1613 free_irq(itdev->cir_irq, itdev); 1613 free_irq(itdev->cir_irq, itdev);
1614failure2: 1614exit_release_cir_addr:
1615 release_region(itdev->cir_addr, itdev->params.io_region_size); 1615 release_region(itdev->cir_addr, itdev->params.io_region_size);
1616failure: 1616exit_free_dev_rdev:
1617 rc_free_device(rdev); 1617 rc_free_device(rdev);
1618 kfree(itdev); 1618 kfree(itdev);
1619 1619