Skip to content

Commit 0a6e8d0

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 586d090 commit 0a6e8d0

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
@@ -1335,7 +1335,9 @@ static int exynos_dsi_register_te_irq(struct exynos_dsi *dsi,
13351335
int te_gpio_irq;
13361336

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

0 commit comments

Comments
 (0)