OMAP: DSS2: Taal: Fix request_irq() error handling
authorJani Nikula <ext-jani.1.nikula@nokia.com>
Fri, 9 Apr 2010 10:52:33 +0000 (13:52 +0300)
committerTomi Valkeinen <tomi.valkeinen@nokia.com>
Tue, 3 Aug 2010 12:18:47 +0000 (15:18 +0300)
Separate gpio_request() and request_irq() error handling.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
drivers/video/omap2/displays/panel-taal.c

index 3421be3d85da2d6f67e20e39fd1fa14ab0f28828..af0750e91a5df6282c325af71db786aa1587b853 100644 (file)
@@ -603,7 +603,7 @@ static int taal_probe(struct omap_dss_device *dssdev)
                if (r) {
                        dev_err(&dssdev->dev, "IRQ request failed\n");
                        gpio_free(gpio);
-                       goto err3;
+                       goto err4;
                }
 
                init_completion(&td->te_completion);
@@ -614,16 +614,16 @@ static int taal_probe(struct omap_dss_device *dssdev)
        r = sysfs_create_group(&dssdev->dev.kobj, &taal_attr_group);
        if (r) {
                dev_err(&dssdev->dev, "failed to create sysfs files\n");
-               goto err4;
+               goto err5;
        }
 
        return 0;
+err5:
+       if (td->use_ext_te)
+               free_irq(gpio_to_irq(dssdev->phy.dsi.ext_te_gpio), dssdev);
 err4:
-       if (td->use_ext_te) {
-               int gpio = dssdev->phy.dsi.ext_te_gpio;
-               free_irq(gpio_to_irq(gpio), dssdev);
-               gpio_free(gpio);
-       }
+       if (td->use_ext_te)
+               gpio_free(dssdev->phy.dsi.ext_te_gpio);
 err3:
        backlight_device_unregister(bldev);
 err2: