thinkpad-acpi: fix sign of ERESTARTSYS return
authorRoel Kluin <roel.kluin@gmail.com>
Fri, 20 Nov 2009 18:48:23 +0000 (19:48 +0100)
committerLen Brown <len.brown@intel.com>
Wed, 25 Nov 2009 05:39:21 +0000 (00:39 -0500)
The returned error should be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@kernel.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/thinkpad_acpi.c

index d93108d..03c0a56 100644 (file)
@@ -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 = {