]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
thinkpad-acpi: fix sign of ERESTARTSYS return
authorRoel Kluin <roel.kluin@gmail.com>
Fri, 20 Nov 2009 18:48:23 +0000 (19:48 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 19:17:24 +0000 (11:17 -0800)
commit 80a8d1228e90349b4514e8c925c061fa5cbcea75 upstream.

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>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/misc/thinkpad_acpi.c

index 1a551a84ce8e518cbd02a63fb4613af3a29f474c..d3ade96bca638eaf819cf1aa9e7a68b5838ed78d 100644 (file)
@@ -5042,7 +5042,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 = {