This commit fixes the "braces {} are not necessary for any arm of this statement" checkpatch warning. Signed-off-by: Konrad Zapalowicz <bergo.torino@xxxxxxxxx> --- drivers/platform/x86/thinkpad_acpi.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 940f83b..eba72e7 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -5013,11 +5013,11 @@ static int light_write(char *buf) return -ENODEV; while ((cmd = next_cmd(&buf))) { - if (strlencmp(cmd, "on") == 0) { + if (strlencmp(cmd, "on") == 0) newstatus = 1; - } else if (strlencmp(cmd, "off") == 0) { + else if (strlencmp(cmd, "off") == 0) newstatus = 0; - } else + else return -EINVAL; } @@ -5527,15 +5527,14 @@ static int led_write(char *buf) tpacpi_leds[led].led < 0) return -ENODEV; - if (strstr(cmd, "off")) { + if (strstr(cmd, "off")) s = TPACPI_LED_OFF; - } else if (strstr(cmd, "on")) { + else if (strstr(cmd, "on")) s = TPACPI_LED_ON; - } else if (strstr(cmd, "blink")) { + else if (strstr(cmd, "blink")) s = TPACPI_LED_BLINK; - } else { + else return -EINVAL; - } rc = led_set_status(led, s); if (rc < 0) @@ -7878,11 +7877,11 @@ static ssize_t fan_pwm1_enable_show(struct device *dev, if (res) return res; - if (status & TP_EC_FAN_FULLSPEED) { + if (status & TP_EC_FAN_FULLSPEED) mode = 0; - } else if (status & TP_EC_FAN_AUTO) { + else if (status & TP_EC_FAN_AUTO) mode = 2; - } else + else mode = 1; return snprintf(buf, PAGE_SIZE, "%d\n", mode); -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html