[PATCH] kernel/sched/core.c: need return NULL when BUG() is defined as empty.

Chen Gang gang.chen at asianux.com
Mon May 20 03:48:53 EDT 2013


When neither CONFIG_BUG nor HAVE_ARCH_BUG is defined, need let function
return failure value ('NULL') instead of random value.

It is generated by randconfig with MMU for arm s5pv210 with
EXTRA_CFALGS=-W.

The related warnings:
  kernel/sched/core.c:2353:1: warning: control reaches end of non-void function [-Wreturn-type]

Signed-off-by: Chen Gang <gang.chen at asianux.com>
---
 kernel/sched/core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 9ff7744..94ef8ff 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2350,6 +2350,7 @@ pick_next_task(struct rq *rq)
 	}
 
 	BUG(); /* the idle class will always have a runnable task */
+	return NULL;
 }
 
 /*
-- 
1.7.7.6



More information about the linux-arm-kernel mailing list