public inbox for linux-remoteproc@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Himanshu Jha <himanshujha199640@gmail.com>
Cc: ohad@wizery.com, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remoteproc: qcom: Use PTR_ERR_OR_ZERO
Date: Tue, 29 Aug 2017 15:35:13 -0700	[thread overview]
Message-ID: <20170829223513.GM29306@minitux> (raw)
In-Reply-To: <1504014198-16588-1-git-send-email-himanshujha199640@gmail.com>

On Tue 29 Aug 06:43 PDT 2017, Himanshu Jha wrote:

> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 

Applied for v4.14

Thank you,
Bjorn

> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> ---
>  drivers/remoteproc/qcom_adsp_pil.c | 5 +----
>  drivers/remoteproc/qcom_common.c   | 2 +-
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_adsp_pil.c b/drivers/remoteproc/qcom_adsp_pil.c
> index a41d399..d01a8da 100644
> --- a/drivers/remoteproc/qcom_adsp_pil.c
> +++ b/drivers/remoteproc/qcom_adsp_pil.c
> @@ -268,10 +268,7 @@ static int adsp_init_regulator(struct qcom_adsp *adsp)
>  	regulator_set_load(adsp->cx_supply, 100000);
>  
>  	adsp->px_supply = devm_regulator_get(adsp->dev, "px");
> -	if (IS_ERR(adsp->px_supply))
> -		return PTR_ERR(adsp->px_supply);
> -
> -	return 0;
> +	return PTR_ERR_OR_ZERO(adsp->px_supply);
>  }
>  
>  static int adsp_request_irq(struct qcom_adsp *adsp,
> diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
> index 31b8291..7b40b79 100644
> --- a/drivers/remoteproc/qcom_common.c
> +++ b/drivers/remoteproc/qcom_common.c
> @@ -55,7 +55,7 @@ static int smd_subdev_probe(struct rproc_subdev *subdev)
>  
>  	smd->edge = qcom_smd_register_edge(smd->dev, smd->node);
>  
> -	return IS_ERR(smd->edge) ? PTR_ERR(smd->edge) : 0;
> +	return PTR_ERR_OR_ZERO(smd->edge);
>  }
>  
>  static void smd_subdev_remove(struct rproc_subdev *subdev)
> -- 
> 2.7.4
> 

      reply	other threads:[~2017-08-29 22:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 13:43 [PATCH] remoteproc: qcom: Use PTR_ERR_OR_ZERO Himanshu Jha
2017-08-29 22:35 ` Bjorn Andersson [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=20170829223513.GM29306@minitux \
    --to=bjorn.andersson@linaro.org \
    --cc=himanshujha199640@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    /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