* [PATCH][next] drm/rockchip: lvds: ensure ret is assigned before checking for an error
@ 2020-07-14 19:00 Colin King
2020-08-03 6:46 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-07-14 19:00 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter,
Miquel Raynal, dri-devel, linux-arm-kernel, linux-rockchip
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently there are two places where the return status in ret is being
checked for an error however the assignment of ret has been omitted
making the checks redundant. Fix this by adding in the missing assignments
of ret.
Addresses-Coverity: ("Logically dead code")
Fixes: cca1705c3d89 ("drm/rockchip: lvds: Add PX30 support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
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 63f967902c2d..b45c618b9793 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.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] drm/rockchip: lvds: ensure ret is assigned before checking for an error
2020-07-14 19:00 [PATCH][next] drm/rockchip: lvds: ensure ret is assigned before checking for an error Colin King
@ 2020-08-03 6:46 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2020-08-03 6:46 UTC (permalink / raw)
To: Colin King
Cc: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter,
dri-devel, linux-arm-kernel, linux-rockchip, kernel-janitors,
linux-kernel
Hello,
Colin King <colin.king@canonical.com> wrote on Tue, 14 Jul 2020
20:00:03 +0100:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently there are two places where the return status in ret is being
> checked for an error however the assignment of ret has been omitted
> making the checks redundant. Fix this by adding in the missing assignments
> of ret.
>
> Addresses-Coverity: ("Logically dead code")
> Fixes: cca1705c3d89 ("drm/rockchip: lvds: Add PX30 support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> 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 63f967902c2d..b45c618b9793 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;
>
I thought I (or Heiko) already sent a patch for that but apparently
not...
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-03 6:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 19:00 [PATCH][next] drm/rockchip: lvds: ensure ret is assigned before checking for an error Colin King
2020-08-03 6:46 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).