]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
vt: remove redundant check on vc_mode in con_font_set()
authorWang Liang <wangliang74@huawei.com>
Thu, 4 Sep 2025 02:33:45 +0000 (10:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:49:52 +0000 (15:49 +0200)
Previous commit edab558feba1 ("vt: sort out locking for font handling")
move the vc_mode check into console_lock protect, but forget to remove the
old check in con_font_set(). Just remove the redundant check.

Signed-off-by: Wang Liang <wangliang74@huawei.com>
Link: https://lore.kernel.org/r/20250904023345.13731-1-wangliang74@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c

index 3f80e98e5c51345864ae48496d8fd661462ad9d6..1d9abcfac4c914a22454038b18982fab255d0694 100644 (file)
@@ -4885,8 +4885,6 @@ static int con_font_set(struct vc_data *vc, const struct console_font_op *op)
        int size;
        unsigned int vpitch = op->op == KD_FONT_OP_SET_TALL ? op->height : 32;
 
-       if (vc->vc_mode != KD_TEXT)
-               return -EINVAL;
        if (!op->data)
                return -EINVAL;
        if (op->charcount > max_font_glyphs)