kernel/sys.c: clean up sys_shutdown exit path
authorAndi Kleen <andi@firstfloor.org>
Mon, 13 Apr 2009 21:40:08 +0000 (14:40 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Apr 2009 22:04:32 +0000 (15:04 -0700)
commit3d26dcf7679c5cc6c9f3b95ffdb2152fba2b7fae
tree4d2b6f5e36a20ed02021a1956b53a5ef6d6f8932
parent4cafbd0b94d2c8cae6ede6d1c3ab90547547a3d2
kernel/sys.c: clean up sys_shutdown exit path

Impact: cleanup, fix

Clean up sys_shutdown() exit path.  Factor out common code.  Return
correct error code instead of always 0 on failure.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sys.c