mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 03:43:03 +00:00
[PATCH] kexec warning fix
This fixes a couple of compiler warnings, and adds paranoia checks as well. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
3171a0305d
commit
0b4a8a789a
|
@ -995,7 +995,8 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
|
||||||
image = xchg(dest_image, image);
|
image = xchg(dest_image, image);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
xchg(&kexec_lock, 0); /* Release the mutex */
|
locked = xchg(&kexec_lock, 0); /* Release the mutex */
|
||||||
|
BUG_ON(!locked);
|
||||||
kimage_free(image);
|
kimage_free(image);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -1061,7 +1062,8 @@ void crash_kexec(struct pt_regs *regs)
|
||||||
machine_crash_shutdown(&fixed_regs);
|
machine_crash_shutdown(&fixed_regs);
|
||||||
machine_kexec(kexec_crash_image);
|
machine_kexec(kexec_crash_image);
|
||||||
}
|
}
|
||||||
xchg(&kexec_lock, 0);
|
locked = xchg(&kexec_lock, 0);
|
||||||
|
BUG_ON(!locked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue