Skip to content

Commit c13d38b

Browse files
ColinIanKingrafaeljw
authored andcommitted
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: 90711f7 ("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>
1 parent 80744a3 commit c13d38b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/acpi/apei/einj-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ static ssize_t u128_write(struct file *f, const char __user *buf, size_t count,
913913
u8 tmp[COMPONENT_LEN];
914914
char byte[3] = {};
915915
char *s, *e;
916-
size_t c;
916+
ssize_t c;
917917
long val;
918918
int i;
919919

0 commit comments

Comments
 (0)