linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]drivers: cpuidle: remove checkpatch error
@ 2017-09-01 19:26 gaurav jindal
  0 siblings, 0 replies; only message in thread
From: gaurav jindal @ 2017-09-01 19:26 UTC (permalink / raw)
  To: rjw, daniel.lezcano; +Cc: linux-pm, linux-kernel

this commit removes the checkpatch error in cpuidle_enable_device
function. With removal of error, this commit makes the calling of
cpuidle_curr_governor->enable more smooth. 

Signed-off-by: gaurav jindal<gauravjindal1104@gmail.com>

---

diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 60bb64f..44f09a8 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -399,9 +399,11 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
 	if (ret)
 		return ret;

-	if (cpuidle_curr_governor->enable &&
-	    (ret = cpuidle_curr_governor->enable(drv, dev)))
-		goto fail_sysfs;
+	if (cpuidle_curr_governor->enable) {
+		ret = cpuidle_curr_governor->enable(drv, dev);
+		if (ret)
+			goto fail_sysfs;
+	}

 	smp_wmb();

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-01 19:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-01 19:26 [PATCH]drivers: cpuidle: remove checkpatch error gaurav jindal

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