diff options
-rw-r--r-- | drivers/platform/x86/asus-laptop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 19445eaff6f..40897bab2eb 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -796,10 +796,11 @@ static ssize_t store_ledd(struct device *dev, struct device_attribute *attr, rv = parse_arg(buf, count, &value); if (rv > 0) { - if (write_acpi_int(asus->handle, METHOD_LEDD, value)) + if (write_acpi_int(asus->handle, METHOD_LEDD, value)) { pr_warning("LED display write failed\n"); - else - asus->ledd_status = (u32) value; + return -ENODEV; + } + asus->ledd_status = (u32) value; } return rv; } |