Skip to contentSkip to conversation

toshiba_acpi: Silence build testing warnings

PATCH New Azael Avalos 1 participant 1 message Apr 13, 2014

Subsystems (2)
lore
Share & tools
lore

Azael Avalos

author maintainer
#0 lore raw

PATCH 1/1 toshiba_acpi: Silence build testing warnings

Intel test builder caught some warnings, one at the KBD backlight mode store while validating for correct parameters, and another one that might lead to not creating the sysfs group

---
 drivers/platform/x86/toshiba_acpi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/toshiba_acpi.c +2 -2
index fbbe46d..f397594 100644
@@ -1218,7 +1218,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:
@@ -1741,7 +1741,7 @@ static int toshiba_acpi_add(struct acpi_device *acpi_dev)
 
 	ret = sysfs_create_group(&dev->acpi_dev->dev.kobj,
 				 &toshiba_attr_group);
-	if (ret) {
+	if (ret != 0) {
 		dev->sysfs_created = 0;
 		goto error;
 	}
Signature · 1 line
1.9.1