aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-wmi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index e50872632c5a..3b9fb91e25ff 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1307,14 +1307,18 @@ ASUS_WMI_CREATE_DEVICE_ATTR(cardr, 0644, ASUS_WMI_DEVID_CARDREADER);
1307static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr, 1307static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
1308 const char *buf, size_t count) 1308 const char *buf, size_t count)
1309{ 1309{
1310 int value; 1310 int value, rv;
1311 1311
1312 if (!count || sscanf(buf, "%i", &value) != 1) 1312 if (!count || sscanf(buf, "%i", &value) != 1)
1313 return -EINVAL; 1313 return -EINVAL;
1314 if (value < 0 || value > 2) 1314 if (value < 0 || value > 2)
1315 return -EINVAL; 1315 return -EINVAL;
1316 1316
1317 return asus_wmi_evaluate_method(ASUS_WMI_METHODID_CFVS, value, 0, NULL); 1317 rv = asus_wmi_evaluate_method(ASUS_WMI_METHODID_CFVS, value, 0, NULL);
1318 if (rv < 0)
1319 return rv;
1320
1321 return count;
1318} 1322}
1319 1323
1320static DEVICE_ATTR(cpufv, S_IRUGO | S_IWUSR, NULL, store_cpufv); 1324static DEVICE_ATTR(cpufv, S_IRUGO | S_IWUSR, NULL, store_cpufv);