mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +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;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user