linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] power: avs: qcom-cpr: simplify the return expression of cpr_disable()
@ 2020-09-15  3:26 Liu Shixin
  2020-09-15  3:17 ` Bjorn Andersson
  0 siblings, 1 reply; 4+ messages in thread
From: Liu Shixin @ 2020-09-15  3:26 UTC (permalink / raw)
  To: Niklas Cassel, Andy Gross, Bjorn Andersson, Kevin Hilman, Nishanth Menon
  Cc: linux-pm, linux-arm-msm, linux-kernel, Liu Shixin

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-22 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-09-18 20:12   ` Kevin Hilman
2020-09-22 16:07     ` Rafael J. Wysocki

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