From: Huang Ying Date: Fri, 15 Aug 2008 07:40:20 +0000 (-0700) Subject: kexec: fix compilation warning on xchg(&kexec_lock, 0) in kernel_kexec() X-Git-Tag: v2.6.27-rc4~97 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cd69b986ebf0f8da93f82ffbb89c032ee09c2e1;p=linux-2.6 kexec: fix compilation warning on xchg(&kexec_lock, 0) in kernel_kexec() kernel/kexec.c: In function 'kernel_kexec': kernel/kexec.c:1506: warning: value computed is not used Signed-off-by: Huang Ying Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/kexec.c b/kernel/kexec.c index c8a4370e2a..cf3797b767 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -1503,7 +1503,8 @@ int kernel_kexec(void) } Unlock: - xchg(&kexec_lock, 0); + if (!xchg(&kexec_lock, 0)) + BUG(); return error; }