On 03.09.2026 08:52, Li Youhong wrote: > From: Li Youhong <[email protected]> > > When the Exynos DSI driver was generalized into samsung-dsim, the TE > GPIO acquisition was switched from gpiod_get_optional() to > devm_gpiod_get_optional(), but the matching gpiod_put() calls on the > request_irq() error path and in samsung_dsim_unregister_te_irq() were > left in place. > > With a managed descriptor those puts are wrong: the GPIO is already > released by the devres action on driver detach, so the extra > gpiod_put() drops the GPIO chip / module references a second time. > > Remove the manual gpiod_put() calls and keep free_irq() for the > non-devm request_threaded_irq(). > > Fixes: e7447128ca4a ("drm: bridge: Generalize Exynos-DSI driver into a > Samsung DSIM bridge") > Signed-off-by: Li Youhong <[email protected]> Acked-by: Marek Szyprowski <[email protected]> > --- > drivers/gpu/drm/bridge/samsung-dsim.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c > b/drivers/gpu/drm/bridge/samsung-dsim.c > index e2fc69fc51b6..f6aa1403e184 100644 > --- a/drivers/gpu/drm/bridge/samsung-dsim.c > +++ b/drivers/gpu/drm/bridge/samsung-dsim.c > @@ -1874,7 +1874,6 @@ static int samsung_dsim_register_te_irq(struct > samsung_dsim *dsi, struct device > IRQF_TRIGGER_RISING | IRQF_NO_AUTOEN, "TE", dsi); > if (ret) { > dev_err(dsi->dev, "request interrupt failed with %d\n", ret); > - gpiod_put(dsi->te_gpio); > return ret; > } > @@ -1883,10 +1882,8 @@ static int samsung_dsim_register_te_irq(struct > samsung_dsim *dsi, struct device > static void samsung_dsim_unregister_te_irq(struct samsung_dsim *dsi) > { > - if (dsi->te_gpio) { > + if (dsi->te_gpio) > free_irq(gpiod_to_irq(dsi->te_gpio), dsi); > - gpiod_put(dsi->te_gpio); > - } > } > static int samsung_dsim_host_attach(struct mipi_dsi_host *host,
Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
