aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-09-10 00:49:57 -0400
committerTony Luck <tony.luck@intel.com>2012-09-10 17:31:23 -0400
commit36a45e741783629e2c9039da51b95f637d56f875 (patch)
tree68d103b717f4d17a98e838822f08ca1d3c96133e /arch/ia64
parent7cd10a60c3d0db95bc94073587725adc6c813cc3 (diff)
[IA64] kexec: Move the dereference below the NULL test
The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/machine_kexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
index 070e8effa175..5151a649c96b 100644
--- a/arch/ia64/kernel/machine_kexec.c
+++ b/arch/ia64/kernel/machine_kexec.c
@@ -85,12 +85,13 @@ static void ia64_machine_kexec(struct unw_frame_info *info, void *arg)
85 struct kimage *image = arg; 85 struct kimage *image = arg;
86 relocate_new_kernel_t rnk; 86 relocate_new_kernel_t rnk;
87 void *pal_addr = efi_get_pal_addr(); 87 void *pal_addr = efi_get_pal_addr();
88 unsigned long code_addr = (unsigned long)page_address(image->control_code_page); 88 unsigned long code_addr;
89 int ii; 89 int ii;
90 u64 fp, gp; 90 u64 fp, gp;
91 ia64_fptr_t *init_handler = (ia64_fptr_t *)ia64_os_init_on_kdump; 91 ia64_fptr_t *init_handler = (ia64_fptr_t *)ia64_os_init_on_kdump;
92 92
93 BUG_ON(!image); 93 BUG_ON(!image);
94 code_addr = (unsigned long)page_address(image->control_code_page);
94 if (image->type == KEXEC_TYPE_CRASH) { 95 if (image->type == KEXEC_TYPE_CRASH) {
95 crash_save_this_cpu(); 96 crash_save_this_cpu();
96 current->thread.ksp = (__u64)info->sw - 16; 97 current->thread.ksp = (__u64)info->sw - 16;