From: Matthew Garrett Date: Wed, 20 Aug 2014 15:18:18 +0000 (-0700) Subject: Revert "platform/x86/toshiba-apci.c possible bad if test?" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8039aabb6c9f802bca04cc77ca210060a5b53916;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Revert "platform/x86/toshiba-apci.c possible bad if test?" This reverts commit bdc3ae7221213963f438faeaa69c8b4a2195f491. Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index e4da61bcbf8b..b062d3d7b373 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -1258,7 +1258,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: