drm/imx: parallel-display: Accept drm_of_find_panel_or_bridge failure
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 12 Jun 2017 15:54:29 +0000 (17:54 +0200)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 17 Jul 2017 13:57:52 +0000 (15:57 +0200)
The parallel panel driver should continue to work without having an
endpoint linking to an panel in DT for backwards compatibility.
With the recent switch to drm_of_find_panel_or_bridge, an absent
panel results in a failure with -ENODEV error return code. To restore
the old behaviour, ignore the -ENODEV return code.

Reported-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Fixes: ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge")
Tested-by: Chris Healy <cphealy@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/imx/parallel-display.c

index 636031a30e17d5b3b74aee7d99d475b0d681b097..8aca20209cb80dd37e8adf5f4174dffcba1fa2a0 100644 (file)
@@ -237,7 +237,7 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
 
        /* port@1 is the output port */
        ret = drm_of_find_panel_or_bridge(np, 1, 0, &imxpd->panel, &imxpd->bridge);
-       if (ret)
+       if (ret && ret != -ENODEV)
                return ret;
 
        imxpd->dev = dev;