mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
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: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
parent
a5c155b16f
commit
d48690383f
@ -388,7 +388,9 @@ static ssize_t cpufv_store(struct device *dev,
|
||||
return rv;
|
||||
if (value < 0 || value >= c.num)
|
||||
return -EINVAL;
|
||||
set_acpi(eeepc, CM_ASL_CPUFV, value);
|
||||
rv = set_acpi(eeepc, CM_ASL_CPUFV, value);
|
||||
if (rv)
|
||||
return rv;
|
||||
return count;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user