diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-03-11 05:34:50 -0400 |
---|---|---|
committer | Darren Hart <dvhart@linux.intel.com> | 2015-03-14 14:59:15 -0400 |
commit | abf9dc0d9ae813d425675656f1af16f58c60e443 (patch) | |
tree | 459b76028bd72af4febcd999fc0c08e50cacecfd /drivers/platform | |
parent | b4dd04ac6ef88259ddb59ca809ca5845c7892139 (diff) |
thinkpad_acpi: signedness bugs getting current_mode
This needs to be signed for the error handling to work. Valid modes are
small positive integers.
Fixes: b790ceeb0fd9 ('thinkpad_acpi: Add adaptive_kbd_mode sysfs attr')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-By: Bastien Nocera <hadess@hadess.net>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 56eaddc5f222..024861db1587 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -2938,7 +2938,7 @@ static ssize_t adaptive_kbd_mode_show(struct device *dev, | |||
2938 | struct device_attribute *attr, | 2938 | struct device_attribute *attr, |
2939 | char *buf) | 2939 | char *buf) |
2940 | { | 2940 | { |
2941 | u32 current_mode; | 2941 | int current_mode; |
2942 | 2942 | ||
2943 | current_mode = adaptive_keyboard_get_mode(); | 2943 | current_mode = adaptive_keyboard_get_mode(); |
2944 | if (current_mode < 0) | 2944 | if (current_mode < 0) |
@@ -3621,7 +3621,7 @@ static int adaptive_keyboard_get_next_mode(int mode) | |||
3621 | 3621 | ||
3622 | static bool adaptive_keyboard_hotkey_notify_hotkey(unsigned int scancode) | 3622 | static bool adaptive_keyboard_hotkey_notify_hotkey(unsigned int scancode) |
3623 | { | 3623 | { |
3624 | u32 current_mode = 0; | 3624 | int current_mode = 0; |
3625 | int new_mode = 0; | 3625 | int new_mode = 0; |
3626 | int keycode; | 3626 | int keycode; |
3627 | 3627 | ||