On Wed, Jan 07, 2026 at 06:07:00AM +0300, Vladimir Yakovlev wrote:
> It's better to use devm_request_threaded_irq because resources will be
> freed automatically and no additional checks are needed.
>
> Signed-off-by: Vladimir Yakovlev <[email protected]>
> ---
> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
> b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
> index 3868ad05e011..bb5cff021c93 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
> @@ -851,9 +851,9 @@ static int lt9611uxc_probe(struct i2c_client *client)
> init_waitqueue_head(<9611uxc->wq);
> INIT_WORK(<9611uxc->work, lt9611uxc_hpd_work);
>
> - ret = request_threaded_irq(client->irq, NULL,
> - lt9611uxc_irq_thread_handler,
> - IRQF_ONESHOT, "lt9611uxc", lt9611uxc);
> + ret = devm_request_threaded_irq(dev, client->irq, NULL,
> + lt9611uxc_irq_thread_handler,
> + IRQF_ONESHOT, "lt9611uxc", lt9611uxc);
This makes interrupt being registered until the _end_ of the
lt9611uxc_remove() (or lt9611uxc_probe() in case of probe error). Are
you sure that the code can cope with the stray IRQs being delivered
during or right after lt9611uxc_remove()?
> if (ret) {
> dev_err(dev, "failed to request irq\n");
> goto err_disable_regulators;
> @@ -892,7 +892,6 @@ static int lt9611uxc_probe(struct i2c_client *client)
> return 0;
>
> err_remove_bridge:
> - free_irq(client->irq, lt9611uxc);
> cancel_work_sync(<9611uxc->work);
> drm_bridge_remove(<9611uxc->bridge);
>
> @@ -910,7 +909,6 @@ static void lt9611uxc_remove(struct i2c_client *client)
> {
> struct lt9611uxc *lt9611uxc = i2c_get_clientdata(client);
>
> - free_irq(client->irq, lt9611uxc);
> cancel_work_sync(<9611uxc->work);
> lt9611uxc_audio_exit(lt9611uxc);
> drm_bridge_remove(<9611uxc->bridge);
> --
> 2.34.1
>
--
With best wishes
Dmitry