[PATCH] scsi: lpfc: Use isdigit() in lpfc_wwn_set()

From: Thorsten Blum

Date: Thu Nov 05 2026 - 18:42:23 EST


Use isdigit() to replace the open-coded implementation.

Signed-off-by: Thorsten Blum <blum@xxxxxxxxxx>
---
drivers/scsi/lpfc/lpfc_attr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index bb5c84f0b787..4ae113002af4 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -3082,7 +3082,7 @@ lpfc_wwn_set(const char *buf, size_t cnt, char wwn[])
j = ((j << 4) | ((*buf++ - 'a') + 10));
else if ((*buf >= 'A') && (*buf <= 'F'))
j = ((j << 4) | ((*buf++ - 'A') + 10));
- else if ((*buf >= '0') && (*buf <= '9'))
+ else if (isdigit(*buf))
j = ((j << 4) | (*buf++ - '0'));
else
return -EINVAL;