diff options
author | Guiling Deng <greens9@163.com> | 2022-06-28 19:36:41 +0300 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-07-06 18:04:47 +0300 |
commit | 955f04766d4e6eb94bf3baa539e096808c74ebfb (patch) | |
tree | 918678538d1317b1b74e6139421787ac149816e9 | |
parent | 88084a3df1672e131ddc1b4e39eeacfd39864acf (diff) | |
download | linux-955f04766d4e6eb94bf3baa539e096808c74ebfb.tar.xz |
fbdev: fbmem: Fix logo center image dx issue
Image.dx gets wrong value because of missing '()'.
If xres == logo->width and n == 1, image.dx = -16.
Signed-off-by: Guiling Deng <greens9@163.com>
Fixes: 3d8b1933eb1c ("fbdev: fbmem: add config option to center the bootup logo")
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | drivers/video/fbdev/core/fbmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 8afc4538558c..ee63b5b47290 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -511,7 +511,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; |