[PATCH] tty: use isdigit() in tty_find_polling_driver()
From: Thorsten Blum
Date: Fri Nov 06 2026 - 04:01:50 EST
Use isdigit() to replace the open-coded implementation.
Signed-off-by: Thorsten Blum <blum@xxxxxxxxxx>
---
drivers/tty/tty_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 1a6c8a1bc764..3575310c72e0 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -383,7 +383,7 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line)
char *str, *stp;
for (str = name; *str; str++)
- if ((*str >= '0' && *str <= '9') || *str == ',')
+ if (isdigit(*str) || *str == ',')
break;
if (!*str)
return NULL;