Merge tag 'fbdev-v4.19' of https://github.com/bzolnier/linux
[muen/linux.git] / drivers / video / fbdev / omap2 / omapfb / displays / encoder-tpd12s015.c
index 3079a3df8c3756a46d528dc8a147508356aae8b0..47f0459e3551b3a493bd94e7ebb26e8ab6cfc622 100644 (file)
@@ -219,7 +219,7 @@ static int tpd_probe_of(struct platform_device *pdev)
 
 static int tpd_probe(struct platform_device *pdev)
 {
-       struct omap_dss_device *in, *dssdev;
+       struct omap_dss_device *dssdev;
        struct panel_drv_data *ddata;
        int r;
        struct gpio_desc *gpio;
@@ -238,25 +238,30 @@ static int tpd_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-
        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;
 
@@ -268,8 +273,6 @@ static int tpd_probe(struct platform_device *pdev)
        dssdev->owner = THIS_MODULE;
        dssdev->port_num = 1;
 
-       in = ddata->in;
-
        r = omapdss_register_output(dssdev);
        if (r) {
                dev_err(&pdev->dev, "Failed to register output\n");