From 25f657f7dd36656321c1d769befdad7265f22026 Mon Sep 17 00:00:00 2001 From: Thorsten Blum Date: Wed, 14 Oct 2026 16:30:32 +0200 Subject: [PATCH] serial: core: Use isdigit() in uart_parse_options() Use isdigit() to replace the open-coded implementation. Signed-off-by: Thorsten Blum Reviewed-by: John Ogness Link: https://patch.msgid.link/20261014143034.104950-3-blum@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/serial_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 9eea8d1a0e8a..c0deec0e6af4 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -2219,7 +2220,7 @@ uart_parse_options(const char *options, int *baud, int *parity, const char *s = options; *baud = simple_strtoul(s, NULL, 10); - while (*s >= '0' && *s <= '9') + while (isdigit(*s)) s++; if (*s) *parity = *s++;