Commit 80a8d122 authored by Roel Kluin's avatar Roel Kluin Committed by Len Brown

thinkpad-acpi: fix sign of ERESTARTSYS return

The returned error should be negative
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: <stable@kernel.org>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 8b1edc57
...@@ -6313,7 +6313,7 @@ static int brightness_write(char *buf) ...@@ -6313,7 +6313,7 @@ static int brightness_write(char *buf)
* Doing it this way makes the syscall restartable in case of EINTR * Doing it this way makes the syscall restartable in case of EINTR
*/ */
rc = brightness_set(level); rc = brightness_set(level);
return (rc == -EINTR)? ERESTARTSYS : rc; return (rc == -EINTR)? -ERESTARTSYS : rc;
} }
static struct ibm_struct brightness_driver_data = { static struct ibm_struct brightness_driver_data = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment