2021-05-01 15:14:37

by Christophe JAILLET

[permalink] [raw]
Subject: [PATCH] drm/rockchip: Fix an error handling path

'ret' is know to be 0 a this point. Checking the return value of
'phy_init()' and 'phy_set_mode()' was intended instead.

So add the missing assignments.

Fixes: cca1705c3d89 ("drm/rockchip: lvds: Add PX30 support")
Signed-off-by: Christophe JAILLET <[email protected]>
---
drivers/gpu/drm/rockchip/rockchip_lvds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c
index bd5ba10822c2..489d63c05c0d 100644
--- a/drivers/gpu/drm/rockchip/rockchip_lvds.c
+++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c
@@ -499,11 +499,11 @@ static int px30_lvds_probe(struct platform_device *pdev,
if (IS_ERR(lvds->dphy))
return PTR_ERR(lvds->dphy);

- phy_init(lvds->dphy);
+ ret = phy_init(lvds->dphy);
if (ret)
return ret;

- phy_set_mode(lvds->dphy, PHY_MODE_LVDS);
+ ret = phy_set_mode(lvds->dphy, PHY_MODE_LVDS);
if (ret)
return ret;

--
2.30.2


2021-05-28 18:57:55

by Heiko Stübner

[permalink] [raw]
Subject: Re: [PATCH] drm/rockchip: Fix an error handling path

On Sat, 1 May 2021 17:13:16 +0200, Christophe JAILLET wrote:
> 'ret' is know to be 0 a this point. Checking the return value of
> 'phy_init()' and 'phy_set_mode()' was intended instead.
>
> So add the missing assignments.

Applied, thanks!

[1/1] drm/rockchip: Fix an error handling path
commit: 3dfa159f6b0c054eb63673fbf643a5f2cc862e63

Best regards,
--
Heiko Stuebner <[email protected]>