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

Commit 407c1b49 authored by Guiling Deng's avatar Guiling Deng Committed by Greg Kroah-Hartman
Browse files

fbdev: fbmem: Fix logo center image dx issue



commit 955f04766d4e6eb94bf3baa539e096808c74ebfb upstream.

Image.dx gets wrong value because of missing '()'.

If xres == logo->width and n == 1, image.dx = -16.

Signed-off-by: default avatarGuiling Deng <greens9@163.com>
Fixes: 3d8b1933 ("fbdev: fbmem: add config option to center the bootup logo")
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 14ff1184
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -512,7 +512,7 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,

		while (n && (n * (logo->width + 8) - 8 > xres))
			--n;
		image.dx = (xres - n * (logo->width + 8) - 8) / 2;
		image.dx = (xres - (n * (logo->width + 8) - 8)) / 2;
		image.dy = y ?: (yres - logo->height) / 2;
	} else {
		image.dx = 0;