1 --- a/drivers/video/console/fbcon.c
2 +++ b/drivers/video/console/fbcon.c
3 @@ -562,7 +562,7 @@ static void fbcon_prepare_logo(struct vc
4 /* Need to make room for the logo */
5 struct fbcon_ops *ops = info->fbcon_par;
6 int cnt, erase = vc->vc_video_erase_char, step;
7 - unsigned short *save = NULL, *r, *q;
8 + unsigned short *r, *q;
11 if (info->flags & FBINFO_MODULE) {
12 @@ -581,37 +581,18 @@ static void fbcon_prepare_logo(struct vc
13 q = (unsigned short *) (vc->vc_origin +
14 vc->vc_size_row * rows);
15 step = logo_lines * cols;
16 - for (r = q - logo_lines * cols; r < q; r++)
17 - if (scr_readw(r) != vc->vc_video_erase_char)
19 - if (r != q && new_rows >= rows + logo_lines) {
20 - save = kmalloc(logo_lines * new_cols * 2, GFP_KERNEL);
22 - int i = cols < new_cols ? cols : new_cols;
23 - scr_memsetw(save, erase, logo_lines * new_cols * 2);
25 - for (cnt = 0; cnt < logo_lines; cnt++, r += i)
26 - scr_memcpyw(save + cnt * new_cols, r, 2 * i);
31 - /* We can scroll screen down */
32 - r = q - step - cols;
33 - for (cnt = rows - logo_lines; cnt > 0; cnt--) {
34 - scr_memcpyw(r + step, r, vc->vc_size_row);
39 - if (vc->vc_y + logo_lines >= rows)
40 - lines = rows - vc->vc_y - 1;
44 - vc->vc_pos += lines * vc->vc_size_row;
47 + r = q - step - cols;
48 + for (cnt = rows - logo_lines; cnt > 0; cnt--) {
49 + scr_memcpyw(r + step, r, vc->vc_size_row);
53 + if (vc->vc_y + logo_lines >= rows)
54 + lines = rows - vc->vc_y - 1;
58 + vc->vc_pos += lines * vc->vc_size_row;
59 scr_memsetw((unsigned short *) vc->vc_origin,
61 vc->vc_size_row * logo_lines);
62 @@ -621,16 +602,6 @@ static void fbcon_prepare_logo(struct vc
67 - q = (unsigned short *) (vc->vc_origin +
70 - scr_memcpyw(q, save, logo_lines * new_cols * 2);
71 - vc->vc_y += logo_lines;
72 - vc->vc_pos += logo_lines * vc->vc_size_row;
76 if (logo_lines > vc->vc_bottom) {
77 logo_shown = FBCON_LOGO_CANSHOW;