summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorGuiling Deng <greens9@163.com>2022-06-28 19:36:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-12 17:30:46 +0300
commit407c1b491fbd774b9c38545718a8225b12acacb1 (patch)
treed13caf15e9651f9ccdfcbc3dbbe5b730289aedd8 /drivers/video
parent14ff1184310fc5f1f8e9318b05f0afba7995c566 (diff)
downloadlinux-407c1b491fbd774b9c38545718a8225b12acacb1.tar.xz
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: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/core/fbmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 03b1bf994cc9..b47cf33d2e93 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -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;