From: Nick Date: Fri, 13 Jun 2014 03:04:15 +0000 (-0400) Subject: platform/x86/toshiba-apci.c possible bad if test? X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bdc3ae7221213963f438faeaa69c8b4a2195f491;p=linux-beck.git platform/x86/toshiba-apci.c possible bad if test? Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 76441dcbe5ff..dfd2243451ba 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -1238,7 +1238,7 @@ static ssize_t toshiba_kbd_bl_mode_store(struct device *dev, int mode = -1; int time = -1; - if (sscanf(buf, "%i", &mode) != 1 && (mode != 2 || mode != 1)) + if (sscanf(buf, "%i", &mode) != 1 || (mode != 2 || mode != 1)) return -EINVAL; /* Set the Keyboard Backlight Mode where: