omapfb: encoder-tpd12s015: fix error return code
[linux-2.6-block.git] / drivers / video / fbdev / omap2 / omapfb / displays / encoder-tpd12s015.c
index 80dc47347e211a4ab8c16e4f3670025cb092f150..2b58bfcff457839b955a7ea278e3a2eac9763209 100644 (file)
@@ -240,22 +240,28 @@ static int tpd_probe(struct platform_device *pdev)
 
        gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 0,
                GPIOD_OUT_LOW);
-       if (IS_ERR(gpio))
+       if (IS_ERR(gpio)) {
+               r = PTR_ERR(gpio);
                goto err_gpio;
+       }
 
        ddata->ct_cp_hpd_gpio = gpio;
 
        gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 1,
                GPIOD_OUT_LOW);
-       if (IS_ERR(gpio))
+       if (IS_ERR(gpio)) {
+               r = PTR_ERR(gpio);
                goto err_gpio;
+       }
 
        ddata->ls_oe_gpio = gpio;
 
        gpio = devm_gpiod_get_index(&pdev->dev, NULL, 2,
                GPIOD_IN);
-       if (IS_ERR(gpio))
+       if (IS_ERR(gpio)) {
+               r = PTR_ERR(gpio);
                goto err_gpio;
+       }
 
        ddata->hpd_gpio = gpio;