aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot/video.c')
-rw-r--r--arch/x86/boot/video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c
index e4ba897bf9a..ad9712f0173 100644
--- a/arch/x86/boot/video.c
+++ b/arch/x86/boot/video.c
@@ -371,7 +371,7 @@ static void save_screen(void)
371 saved.curx = boot_params.screen_info.orig_x; 371 saved.curx = boot_params.screen_info.orig_x;
372 saved.cury = boot_params.screen_info.orig_y; 372 saved.cury = boot_params.screen_info.orig_y;
373 373
374 if (heap_free() < saved.x*saved.y*sizeof(u16)+512) 374 if (!heap_free(saved.x*saved.y*sizeof(u16)+512))
375 return; /* Not enough heap to save the screen */ 375 return; /* Not enough heap to save the screen */
376 376
377 saved.data = GET_HEAP(u16, saved.x*saved.y); 377 saved.data = GET_HEAP(u16, saved.x*saved.y);