Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a525f5e authored by Zhang Yanfei's avatar Zhang Yanfei Committed by Linus Torvalds
Browse files

kexec: get rid of duplicate check for hole_end



hole_end has been checked to make sure it is <= crash_res.end in the while
condition check, so the if condition check is duplicate.

Signed-off-by: default avatarZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Reviewed-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8d67091e
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -503,8 +503,6 @@ static struct page *kimage_alloc_crash_control_pages(struct kimage *image,


		if (hole_end > KEXEC_CRASH_CONTROL_MEMORY_LIMIT)
		if (hole_end > KEXEC_CRASH_CONTROL_MEMORY_LIMIT)
			break;
			break;
		if (hole_end > crashk_res.end)
			break;
		/* See if I overlap any of the segments */
		/* See if I overlap any of the segments */
		for (i = 0; i < image->nr_segments; i++) {
		for (i = 0; i < image->nr_segments; i++) {
			unsigned long mstart, mend;
			unsigned long mstart, mend;