diff mbox series

[v1] drm: bridge: it66121: Check drm_bridge_attach retval

Message ID 20210805185039.402178-1-robert.foss@linaro.org
State Accepted
Commit bd03d440e2589b9c328f40ce60203adf2b19d2e2
Headers show
Series [v1] drm: bridge: it66121: Check drm_bridge_attach retval | expand

Commit Message

Robert Foss Aug. 5, 2021, 6:50 p.m. UTC
The return value of drm_bridge_attach() is ignored during
the it66121_bridge_attach() call, which is incorrect.

Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver")
Signed-off-by: Robert Foss <robert.foss@linaro.org>

---
 drivers/gpu/drm/bridge/ite-it66121.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.30.2

Comments

Jernej Škrabec Aug. 5, 2021, 8:37 p.m. UTC | #1
Hi!

Dne četrtek, 05. avgust 2021 ob 20:50:39 CEST je Robert Foss napisal(a):
> The return value of drm_bridge_attach() is ignored during

> the it66121_bridge_attach() call, which is incorrect.

> 

> Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver")

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

> ---

>  drivers/gpu/drm/bridge/ite-it66121.c | 2 ++

>  1 file changed, 2 insertions(+)


Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>


Best regards,
Jernej
Robert Foss Aug. 6, 2021, 8:49 a.m. UTC | #2
On Thu, 5 Aug 2021 at 22:37, Jernej Škrabec <jernej.skrabec@gmail.com> wrote:
>

> Hi!

>

> Dne četrtek, 05. avgust 2021 ob 20:50:39 CEST je Robert Foss napisal(a):

> > The return value of drm_bridge_attach() is ignored during

> > the it66121_bridge_attach() call, which is incorrect.

> >

> > Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver")

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

> > ---

> >  drivers/gpu/drm/bridge/ite-it66121.c | 2 ++

> >  1 file changed, 2 insertions(+)

>

> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

>


Applied to drm-misc-next
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
index 7149ed40af83..2f2a09adb4bc 100644
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -536,6 +536,8 @@  static int it66121_bridge_attach(struct drm_bridge *bridge,
 		return -EINVAL;
 
 	ret = drm_bridge_attach(bridge->encoder, ctx->next_bridge, bridge, flags);
+	if (ret)
+		return ret;
 
 	ret = regmap_write_bits(ctx->regmap, IT66121_CLK_BANK_REG,
 				IT66121_CLK_BANK_PWROFF_RCLK, 0);