Commit e772aed3 authored by Al Viro's avatar Al Viro

asus-wmi: ->is_visible() can't return negative

It's mode_t; return 0 (no access) on error.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 963945bf
...@@ -857,7 +857,7 @@ static mode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj, ...@@ -857,7 +857,7 @@ static mode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj,
int err = asus_wmi_get_devstate(asus, dev_id, &value); int err = asus_wmi_get_devstate(asus, dev_id, &value);
if (err < 0) if (err < 0)
return err; return 0; /* can't return negative here */
} }
if (dev_id == ASUS_WMI_DEVID_FAN_CTRL) { if (dev_id == ASUS_WMI_DEVID_FAN_CTRL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment