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

Commit 250038f5 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds
Browse files

fbdev: avoid vertical overflow when making space for the logo



fbcon_prepare_logo(): Avoid vertical overflow when making space for the logo

Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: default avatarGeoff Levand <geoffrey.levand@am.sony.com>
Acked-By: default avatarJames Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 538c7924
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -618,8 +618,13 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
			r -= cols;
		}
		if (!save) {
			vc->vc_y += logo_lines;
			vc->vc_pos += logo_lines * vc->vc_size_row;
			int lines;
			if (vc->vc_y + logo_lines >= rows)
				lines = rows - vc->vc_y - 1;
			else
				lines = logo_lines;
			vc->vc_y += lines;
			vc->vc_pos += lines * vc->vc_size_row;
		}
	}
	scr_memsetw((unsigned short *) vc->vc_origin,