]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/bridge: lt9611uxc: Fix an error handling path in lt9611uxc_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 18 Apr 2025 06:48:16 +0000 (08:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:08 +0000 (11:07 +0100)
[ Upstream commit b848cd418aebdb313364b4843f41fae82281a823 ]

If lt9611uxc_audio_init() fails, some resources still need to be released
before returning the error code.

Use the existing error handling path.

Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/f167608e392c6b4d7d7f6e45e3c21878feb60cbd.1744958833.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/lontium-lt9611uxc.c

index cb75da940b89047805e4bb756bc701f4d89dc2fd..e9162125382f52b97e3600b91f290d9d091bb9ec 100644 (file)
@@ -961,7 +961,11 @@ retry:
                }
        }
 
-       return lt9611uxc_audio_init(dev, lt9611uxc);
+       ret = lt9611uxc_audio_init(dev, lt9611uxc);
+       if (ret)
+               goto err_remove_bridge;
+
+       return 0;
 
 err_remove_bridge:
        free_irq(client->irq, lt9611uxc);