Skip to content

Commit

Permalink
drm/bridge: lt9611: Fix an error handling path in lt9611_probe()
Browse files Browse the repository at this point in the history
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: 23278bf ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/9c20eb74d42f6d4128e58e3e46aa320482472b77.1643468761.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Robert Foss <robert.foss@linaro.org>
  • Loading branch information
Christophe JAILLET authored and Robert Foss committed Jan 31, 2022
1 parent 46f4780 commit 9987151
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/bridge/lontium-lt9611.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9987151

Please sign in to comment.