From: Roel Kluin Date: Fri, 20 Nov 2009 18:48:23 +0000 (+0100) Subject: thinkpad-acpi: fix sign of ERESTARTSYS return X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=80a8d1228e90349b4514e8c925c061fa5cbcea75;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git thinkpad-acpi: fix sign of ERESTARTSYS return The returned error should be negative Signed-off-by: Roel Kluin Acked-by: Henrique de Moraes Holschuh Signed-off-by: Andrew Morton Cc: Signed-off-by: Len Brown --- diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index d93108d148f..03c0a56f0c8 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -6313,7 +6313,7 @@ static int brightness_write(char *buf) * Doing it this way makes the syscall restartable in case of EINTR */ rc = brightness_set(level); - return (rc == -EINTR)? ERESTARTSYS : rc; + return (rc == -EINTR)? -ERESTARTSYS : rc; } static struct ibm_struct brightness_driver_data = {