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:
Родитель
a5c155b16f
Коммит
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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче