summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-03-11 12:34:50 +0300
committerDarren Hart <dvhart@linux.intel.com>2015-03-14 11:59:15 -0700
commitabf9dc0d9ae813d425675656f1af16f58c60e443 (patch)
tree459b76028bd72af4febcd999fc0c08e50cacecfd
parentb4dd04ac6ef88259ddb59ca809ca5845c7892139 (diff)
downloadblackbird-obmc-linux-abf9dc0d9ae813d425675656f1af16f58c60e443.tar.gz
blackbird-obmc-linux-abf9dc0d9ae813d425675656f1af16f58c60e443.zip
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>
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c4
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,
struct device_attribute *attr,
char *buf)
{
- u32 current_mode;
+ int current_mode;
current_mode = adaptive_keyboard_get_mode();
if (current_mode < 0)
@@ -3621,7 +3621,7 @@ static int adaptive_keyboard_get_next_mode(int mode)
static bool adaptive_keyboard_hotkey_notify_hotkey(unsigned int scancode)
{
- u32 current_mode = 0;
+ int current_mode = 0;
int new_mode = 0;
int keycode;
OpenPOWER on IntegriCloud