linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	kbuild test robot <lkp@intel.com>
Subject: Re: [PATCH] rcar-csi2: Fix coccinelle warning for PTR_ERR_OR_ZERO()
Date: Thu, 16 May 2019 13:27:25 +0200	[thread overview]
Message-ID: <20190516112725.elkmbjjfiwiyp35b@verge.net.au> (raw)
In-Reply-To: <20190516003538.32172-1-niklas.soderlund+renesas@ragnatech.se>

On Thu, May 16, 2019 at 02:35:38AM +0200, Niklas Söderlund wrote:
> Use the PTR_ERR_OR_ZERO() macro instead of construct:
> 
>     if (IS_ERR(foo))
>         return PTR_ERR(foo);
> 
>     return 0;
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: 3ae854cafd76 ("rcar-csi2: Use standby mode instead of resetting")
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  drivers/media/platform/rcar-vin/rcar-csi2.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/rcar-vin/rcar-csi2.c b/drivers/media/platform/rcar-vin/rcar-csi2.c
> index 8f097e514900307f..c14af1b929dffd34 100644
> --- a/drivers/media/platform/rcar-vin/rcar-csi2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-csi2.c
> @@ -1019,10 +1019,8 @@ static int rcsi2_probe_resources(struct rcar_csi2 *priv,
>  		return ret;
>  
>  	priv->rstc = devm_reset_control_get(&pdev->dev, NULL);
> -	if (IS_ERR(priv->rstc))
> -		return PTR_ERR(priv->rstc);
>  
> -	return 0;
> +	return PTR_ERR_OR_ZERO(priv->rstc);
>  }
>  
>  static const struct rcar_csi2_info rcar_csi2_info_r8a7795 = {
> -- 
> 2.21.0
> 

      parent reply	other threads:[~2019-05-16 11:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16  0:35 [PATCH] rcar-csi2: Fix coccinelle warning for PTR_ERR_OR_ZERO() Niklas Söderlund
2019-05-16  8:00 ` Ulrich Hecht
2019-05-16  8:15 ` Geert Uytterhoeven
2019-05-16 11:27 ` Simon Horman [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=20190516112725.elkmbjjfiwiyp35b@verge.net.au \
    --to=horms@verge.net.au \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    /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).