Skip to content

Commit

Permalink
drm/rockchip: lvds: Fix an error handling path
Browse files Browse the repository at this point in the history
[ Upstream commit 3dfa159 ]

'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: cca1705 ("drm/rockchip: lvds: Add PX30 support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/248220d4815dc8c8088cebfab7d6df5f70518438.1619881852.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tititiou36 authored and gregkh committed Jul 14, 2021
1 parent 76dc42e commit fe8f2ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/rockchip/rockchip_lvds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fe8f2ca

Please sign in to comment.