[PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value

Felix Gu posted 2 patches 2 weeks ago
[PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
Posted by Felix Gu 2 weeks ago
The error check after calling dw_hdmi_probe() was incorrectly checking
the struct pointer hdmi instead of the probe result hdmi->dw_hdmi.

Fix this by checking the correct variable.

Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
index 389eead5f1c4..c9968ec1823c 100644
--- a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
@@ -136,8 +136,8 @@ static int th1520_dw_hdmi_probe(struct platform_device *pdev)
 	plat_data->priv_data = hdmi;
 
 	hdmi->dw_hdmi = dw_hdmi_probe(pdev, plat_data);
-	if (IS_ERR(hdmi))
-		return PTR_ERR(hdmi);
+	if (IS_ERR(hdmi->dw_hdmi))
+		return PTR_ERR(hdmi->dw_hdmi);
 
 	platform_set_drvdata(pdev, hdmi);
 

-- 
2.43.0
Re: [PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
Posted by Dmitry Baryshkov 1 week, 5 days ago
On Sat, Mar 21, 2026 at 03:12:10AM +0800, Felix Gu wrote:
> The error check after calling dw_hdmi_probe() was incorrectly checking
> the struct pointer hdmi instead of the probe result hdmi->dw_hdmi.
> 
> Fix this by checking the correct variable.
> 
> Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry