Skip to contentSkip to conversation

PM: Avoid compiler warning in pm_noirq_op()

PATCH New Rafael J. Wysocki 1 participant 1 message Dec 13, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PM: Avoid compiler warning in pm_noirq_op()

From: Rafael J. Wysocki <[email protected]>

The compiler complains that calltime may be uninitialized in pm_noirq_op(), so add extra initialization for that variable to avoid the warning.

---
 drivers/base/power/main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/main.c +1 -1
Index: linux-2.6/drivers/base/power/main.c
===================================================================
@@ -304,7 +304,7 @@ static int pm_noirq_op(struct device *de
 			pm_message_t state)
 {
 	int error = 0;
-	ktime_t calltime, delta, rettime;
+	ktime_t calltime = ktime_set(0, 0), delta, rettime;
 
 	if (initcall_debug) {
 		pr_info("calling  %s+ @ %i, parent: %s\n",