Skip to content

Commit 955f047

Browse files
Dengguilinghdeller
authored andcommitted
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 <[email protected]> Fixes: 3d8b193 ("fbdev: fbmem: add config option to center the bootup logo") Cc: [email protected] # v5.0+ Signed-off-by: Helge Deller <[email protected]>
1 parent 88084a3 commit 955f047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/video/fbdev/core/fbmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ static int fb_show_logo_line(struct fb_info *info, int rotate,
511511

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

0 commit comments

Comments
 (0)