lkml.org 
[lkml]   [2022]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] drm/bridge: lt9611: Fix an error handling path in lt9611_probe()
Hey Christophe,

Thanks for submitting this fix.

On Sat, 29 Jan 2022 at 16:06, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> If lt9611_audio_init() fails, some resources still need to be released
> before returning an error code.
>
> Add the missing goto the error handling path.
>
> Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/gpu/drm/bridge/lontium-lt9611.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
> index dafb1b47c15f..00597eb54661 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt9611.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
> @@ -1164,7 +1164,11 @@ static int lt9611_probe(struct i2c_client *client,
>
> lt9611_enable_hpd_interrupts(lt9611);
>
> - return lt9611_audio_init(dev, lt9611);
> + ret = lt9611_audio_init(dev, lt9611);
> + if (ret)
> + goto err_remove_bridge;
> +
> + return 0;
>
> err_remove_bridge:
> drm_bridge_remove(&lt9611->bridge);
> --
> 2.32.0
>

Reviewed-by: Robert Foss <robert.foss@linaro.org>

\
 
 \ /
  Last update: 2022-01-31 17:26    [W:1.088 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site