aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/kexec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 1c5fcacbcf33..6db42ff8d520 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -589,14 +589,12 @@ static void kimage_free_extra_pages(struct kimage *image)
589 kimage_free_page_list(&image->unuseable_pages); 589 kimage_free_page_list(&image->unuseable_pages);
590 590
591} 591}
592static int kimage_terminate(struct kimage *image) 592static void kimage_terminate(struct kimage *image)
593{ 593{
594 if (*image->entry != 0) 594 if (*image->entry != 0)
595 image->entry++; 595 image->entry++;
596 596
597 *image->entry = IND_DONE; 597 *image->entry = IND_DONE;
598
599 return 0;
600} 598}
601 599
602#define for_each_kimage_entry(image, ptr, entry) \ 600#define for_each_kimage_entry(image, ptr, entry) \
@@ -997,9 +995,7 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
997 if (result) 995 if (result)
998 goto out; 996 goto out;
999 } 997 }
1000 result = kimage_terminate(image); 998 kimage_terminate(image);
1001 if (result)
1002 goto out;
1003 } 999 }
1004 /* Install the new kernel, and Uninstall the old */ 1000 /* Install the new kernel, and Uninstall the old */
1005 image = xchg(dest_image, image); 1001 image = xchg(dest_image, image);