summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/core/fbcon.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 08:35:30 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 08:35:30 +0100
commitd38e781ea035456c742605fb21d0dd3c755b7b0b (patch)
tree53bda2561a47f747ab4caf1119993cc181780db7 /drivers/video/fbdev/core/fbcon.c
parentf5b3c341a46ec55d93332ee5c254a278af902ffe (diff)
parent4ec5183ec48656cec489c49f989c508b68b518e3 (diff)
downloadlinux-d38e781ea035456c742605fb21d0dd3c755b7b0b.tar.gz
linux-d38e781ea035456c742605fb21d0dd3c755b7b0b.tar.bz2
linux-d38e781ea035456c742605fb21d0dd3c755b7b0b.zip
Merge 6.2-rc7 into char-misc-next
We need the char-misc driver fixes in here as other patches depend on them. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video/fbdev/core/fbcon.c')
-rw-r--r--drivers/video/fbdev/core/fbcon.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 14a7d404062c..1b14c21af2b7 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -2495,9 +2495,12 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font,
h > FBCON_SWAP(info->var.rotate, info->var.yres, info->var.xres))
return -EINVAL;
+ if (font->width > 32 || font->height > 32)
+ return -EINVAL;
+
/* Make sure drawing engine can handle the font */
- if (!(info->pixmap.blit_x & (1 << (font->width - 1))) ||
- !(info->pixmap.blit_y & (1 << (font->height - 1))))
+ if (!(info->pixmap.blit_x & BIT(font->width - 1)) ||
+ !(info->pixmap.blit_y & BIT(font->height - 1)))
return -EINVAL;
/* Make sure driver can handle the font length */