Skip to content

Commit 8e3fa9d

Browse files
mszyprowdaeinki
authored andcommitted
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: ee6c8b5 ("drm/exynos: Replace legacy gpio interface for gpiod interface") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
1 parent 25b5227 commit 8e3fa9d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/gpu/drm/exynos/exynos_drm_dsi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,9 @@ static int exynos_dsi_register_te_irq(struct exynos_dsi *dsi,
13361336
int te_gpio_irq;
13371337

13381338
dsi->te_gpio = devm_gpiod_get_optional(dsi->dev, "te", GPIOD_IN);
1339-
if (IS_ERR(dsi->te_gpio)) {
1339+
if (!dsi->te_gpio) {
1340+
return 0;
1341+
} else if (IS_ERR(dsi->te_gpio)) {
13401342
dev_err(dsi->dev, "gpio request failed with %ld\n",
13411343
PTR_ERR(dsi->te_gpio));
13421344
return PTR_ERR(dsi->te_gpio);

0 commit comments

Comments
 (0)