diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-15 11:26:29 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-09-22 18:04:29 +0200 |
commit | 3ffe2e7318ba705b8e0060d4696cafc75170e819 (patch) | |
tree | 6dbb4f718eb237b228af45cb0c1323a92f102d36 /drivers/power | |
parent | ba4f184e126b751d1bffad5897f263108befc780 (diff) |
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>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/avs/qcom-cpr.c | 8 |
1 files changed, 1 insertions, 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) |