aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ene_ir.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/ene_ir.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/ene_ir.c')
-rw-r--r--drivers/media/rc/ene_ir.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index 22231dd4f62b..f7fdfea49ab1 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -1003,7 +1003,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
1003 dev = kzalloc(sizeof(struct ene_device), GFP_KERNEL); 1003 dev = kzalloc(sizeof(struct ene_device), GFP_KERNEL);
1004 rdev = rc_allocate_device(); 1004 rdev = rc_allocate_device();
1005 if (!dev || !rdev) 1005 if (!dev || !rdev)
1006 goto failure; 1006 goto exit_free_dev_rdev;
1007 1007
1008 /* validate resources */ 1008 /* validate resources */
1009 error = -ENODEV; 1009 error = -ENODEV;
@@ -1014,10 +1014,10 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
1014 1014
1015 if (!pnp_port_valid(pnp_dev, 0) || 1015 if (!pnp_port_valid(pnp_dev, 0) ||
1016 pnp_port_len(pnp_dev, 0) < ENE_IO_SIZE) 1016 pnp_port_len(pnp_dev, 0) < ENE_IO_SIZE)
1017 goto failure; 1017 goto exit_free_dev_rdev;
1018 1018
1019 if (!pnp_irq_valid(pnp_dev, 0)) 1019 if (!pnp_irq_valid(pnp_dev, 0))
1020 goto failure; 1020 goto exit_free_dev_rdev;
1021 1021
1022 spin_lock_init(&dev->hw_lock); 1022 spin_lock_init(&dev->hw_lock);
1023 1023
@@ -1033,7 +1033,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
1033 /* detect hardware version and features */ 1033 /* detect hardware version and features */
1034 error = ene_hw_detect(dev); 1034 error = ene_hw_detect(dev);
1035 if (error) 1035 if (error)
1036 goto failure; 1036 goto exit_free_dev_rdev;
1037 1037
1038 if (!dev->hw_learning_and_tx_capable && txsim) { 1038 if (!dev->hw_learning_and_tx_capable && txsim) {
1039 dev->hw_learning_and_tx_capable = true; 1039 dev->hw_learning_and_tx_capable = true;
@@ -1078,27 +1078,27 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
1078 /* claim the resources */ 1078 /* claim the resources */
1079 error = -EBUSY; 1079 error = -EBUSY;
1080 if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) { 1080 if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
1081 goto failure; 1081 goto exit_free_dev_rdev;
1082 } 1082 }
1083 1083
1084 dev->irq = pnp_irq(pnp_dev, 0); 1084 dev->irq = pnp_irq(pnp_dev, 0);
1085 if (request_irq(dev->irq, ene_isr, 1085 if (request_irq(dev->irq, ene_isr,
1086 IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) { 1086 IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) {
1087 goto failure2; 1087 goto exit_release_hw_io;
1088 } 1088 }
1089 1089
1090 error = rc_register_device(rdev); 1090 error = rc_register_device(rdev);
1091 if (error < 0) 1091 if (error < 0)
1092 goto failure3; 1092 goto exit_free_irq;
1093 1093
1094 pr_notice("driver has been successfully loaded\n"); 1094 pr_notice("driver has been successfully loaded\n");
1095 return 0; 1095 return 0;
1096 1096
1097failure3: 1097exit_free_irq:
1098 free_irq(dev->irq, dev); 1098 free_irq(dev->irq, dev);
1099failure2: 1099exit_release_hw_io:
1100 release_region(dev->hw_io, ENE_IO_SIZE); 1100 release_region(dev->hw_io, ENE_IO_SIZE);
1101failure: 1101exit_free_dev_rdev:
1102 rc_free_device(rdev); 1102 rc_free_device(rdev);
1103 kfree(dev); 1103 kfree(dev);
1104 return error; 1104 return error;