ACPI: APEI: EINJ: Fix less than zero comparison on a size_t variable

The check for c < 0 is always false because variable c is a size_t which
is not a signed type. Fix this by making c a ssize_t.

Fixes: 90711f7bdf ("ACPI: APEI: EINJ: Create debugfs files to enter device id and syndrome")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://patch.msgid.link/20250624201032.522168-1-colin.i.king@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Colin Ian King 2025-06-24 21:10:32 +01:00 committed by Rafael J. Wysocki
parent 80744a3bed
commit c13d38bc9b

View File

@ -913,7 +913,7 @@ static ssize_t u128_write(struct file *f, const char __user *buf, size_t count,
u8 tmp[COMPONENT_LEN];
char byte[3] = {};
char *s, *e;
size_t c;
ssize_t c;
long val;
int i;