All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Liu Shixin <liushixin2@huawei.com>
Cc: Niklas Cassel <nks@flawful.org>, Andy Gross <agross@kernel.org>,
	Kevin Hilman <khilman@kernel.org>, Nishanth Menon <nm@ti.com>,
	linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] power: avs: qcom-cpr: simplify the return expression of cpr_disable()
Date: Mon, 14 Sep 2020 22:17:14 -0500	[thread overview]
Message-ID: <20200915031714.GA670377@yoga> (raw)
In-Reply-To: <20200915032629.1772569-1-liushixin2@huawei.com>

On Mon 14 Sep 22:26 CDT 2020, Liu Shixin wrote:

> Simplify the return expression.
> 
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  drivers/power/avs/qcom-cpr.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/power/avs/qcom-cpr.c b/drivers/power/avs/qcom-cpr.c
> index bd7c3e48b386..b24cc77d1889 100644
> --- a/drivers/power/avs/qcom-cpr.c
> +++ b/drivers/power/avs/qcom-cpr.c
> @@ -665,8 +665,6 @@ static int cpr_enable(struct cpr_drv *drv)
>  
>  static int cpr_disable(struct cpr_drv *drv)
>  {
> -	int ret;
> -
>  	mutex_lock(&drv->lock);
>  
>  	if (cpr_is_allowed(drv)) {
> @@ -676,11 +674,7 @@ static int cpr_disable(struct cpr_drv *drv)
>  
>  	mutex_unlock(&drv->lock);
>  
> -	ret = regulator_disable(drv->vdd_apc);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return regulator_disable(drv->vdd_apc);
>  }
>  
>  static int cpr_config(struct cpr_drv *drv)
> -- 
> 2.25.1
> 

  reply	other threads:[~2020-09-15  3:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15  3:26 [PATCH -next] power: avs: qcom-cpr: simplify the return expression of cpr_disable() Liu Shixin
2020-09-15  3:17 ` Bjorn Andersson [this message]
2020-09-18 20:12   ` Kevin Hilman
2020-09-22 16:07     ` Rafael J. Wysocki

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=20200915031714.GA670377@yoga \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=liushixin2@huawei.com \
    --cc=nks@flawful.org \
    --cc=nm@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.