PM: AVS: qcom-cpr: simplify the return expression of cpr_disable()

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Kevin Hilman <khilman@baylibre.com>
[ rjw: Minor subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Liu Shixin 2020-09-15 11:26:29 +08:00 committed by Rafael J. Wysocki
parent ba4f184e12
commit 3ffe2e7318
1 changed files with 1 additions and 7 deletions

View File

@ -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)