lkml.org 
[lkml]   [2014]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 35/36] timer: simplify CPU_UP_PREPARE notifier code path
Date
Currently we are returning notifier_from_errno() from CPU_UP_PREPARE notifier
when we detect there is an error while calling init_timers_cpu().
notifier_from_errno() already has enough checks within to do something similar.
And so we can call it directly without checking if there was an error or not.

Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
kernel/timer.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index 1d35dda..4360edc 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1646,9 +1646,7 @@ static int timer_cpu_notify(struct notifier_block *self,
case CPU_UP_PREPARE:
case CPU_UP_PREPARE_FROZEN:
err = init_timers_cpu(cpu);
- if (err < 0)
- return notifier_from_errno(err);
- break;
+ return notifier_from_errno(err);
#ifdef CONFIG_HOTPLUG_CPU
case CPU_DEAD:
case CPU_DEAD_FROZEN:
--
1.7.12.rc2.18.g61b472e


\
 
 \ /
  Last update: 2014-04-04 09:41    [W:0.163 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site