Commit 8e3fa9d8 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Inki Dae

drm/exynos: Don't fail if no TE-gpio is defined for DSI driver

TE-gpio is optional and if it is not found then gpiod_get_optional()
returns NULL. In such case the code will continue and try to convert NULL
gpiod to irq what in turn fails. The failure is then propagated and driver
is not registered.

Fix this by returning early from exynos_dsi_register_te_irq() if no
TE-gpio is found.

Fixes: ee6c8b5a ("drm/exynos: Replace legacy gpio interface for gpiod interface")
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 25b52279
......@@ -1336,7 +1336,9 @@ static int exynos_dsi_register_te_irq(struct exynos_dsi *dsi,
int te_gpio_irq;
dsi->te_gpio = devm_gpiod_get_optional(dsi->dev, "te", GPIOD_IN);
if (IS_ERR(dsi->te_gpio)) {
if (!dsi->te_gpio) {
return 0;
} else if (IS_ERR(dsi->te_gpio)) {
dev_err(dsi->dev, "gpio request failed with %ld\n",
PTR_ERR(dsi->te_gpio));
return PTR_ERR(dsi->te_gpio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment