Message ID | 9c20eb74d42f6d4128e58e3e46aa320482472b77.1643468761.git.christophe.jaillet@wanadoo.fr (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/bridge: lt9611: Fix an error handling path in lt9611_probe() | expand |
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(<9611->bridge); > -- > 2.32.0 > Reviewed-by: Robert Foss <robert.foss@linaro.org>
On Mon, 31 Jan 2022 at 17:25, Robert Foss <robert.foss@linaro.org> wrote: > > 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(<9611->bridge); > > -- > > 2.32.0 > > > > Reviewed-by: Robert Foss <robert.foss@linaro.org> Applied to drm-misc-next.
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(<9611->bridge);
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(-)