Skip to contentSkip to conversation

vt: remove redundant check on vc_mode in con_font_set()

PATCH New Wang Liang 1 participant 1 message Sep 4, 2025 TTY layer and serial drivers

lore
Share & tools
lore

Wang Liang

author
#0 lore raw

PATCH 1/1 vt: remove redundant check on vc_mode in con_font_set()

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.

---
 drivers/tty/vt/vt.c | 2 --
 1 file changed, 2 deletions(-)
drivers/tty/vt/vt.c +0 -2
index 62049ceb34de..e4ae86d7da58 100644
@@ -4855,8 +4855,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)
Signature · 1 line
2.33.0