linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Colin King <colin.king@canonical.com>
Cc: "Heiko Stübner" <heiko@sntech.de>,
	"David Airlie" <airlied@linux.ie>,
	kernel-janitors@vger.kernel.org,
	"Sandy Huang" <hjc@rock-chips.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	"Daniel Vetter" <daniel@ffwll.ch>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH][next] drm/rockchip: lvds: ensure ret is assigned before checking for an error
Date: Mon, 3 Aug 2020 08:46:45 +0200	[thread overview]
Message-ID: <20200803084645.442b5178@xps13> (raw)
In-Reply-To: <20200714190003.744069-1-colin.king@canonical.com>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2020-08-03  6:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200803084645.442b5178@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=airlied@linux.ie \
    --cc=colin.king@canonical.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).