Commit d4869038 authored by Frans Klaver's avatar Frans Klaver Committed by Darren Hart

eeepc-laptop: store_cpufv: return error if set_acpi fails

The result of set_acpi is left unchecked, but it may return errors. If
one occurs, send the error to the caller. There's no reason to lie about
it, if set_acpi fails.
Signed-off-by: default avatarFrans Klaver <fransklaver@gmail.com>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
parent a5c155b1
...@@ -388,7 +388,9 @@ static ssize_t cpufv_store(struct device *dev, ...@@ -388,7 +388,9 @@ static ssize_t cpufv_store(struct device *dev,
return rv; return rv;
if (value < 0 || value >= c.num) if (value < 0 || value >= c.num)
return -EINVAL; return -EINVAL;
set_acpi(eeepc, CM_ASL_CPUFV, value); rv = set_acpi(eeepc, CM_ASL_CPUFV, value);
if (rv)
return rv;
return count; return count;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment