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:
Frans Klaver 2014-09-17 23:47:27 +02:00 committed by Darren Hart
parent a5c155b16f
commit d48690383f

View File

@ -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;
}