Skip to content

Commit

Permalink
kexec: fix compilation warning on xchg(&kexec_lock, 0) in kernel_kexec()
Browse files Browse the repository at this point in the history
kernel/kexec.c: In function 'kernel_kexec':
kernel/kexec.c:1506: warning: value computed is not used

Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Huang Ying authored and Linus Torvalds committed Aug 15, 2008
1 parent ce289e8 commit 4cd69b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,8 @@ int kernel_kexec(void)
}

Unlock:
xchg(&kexec_lock, 0);
if (!xchg(&kexec_lock, 0))
BUG();

return error;
}

0 comments on commit 4cd69b9

Please sign in to comment.