Selaa lähdekoodia

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

It's mode_t; return 0 (no access) on error.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 14 vuotta sitten
vanhempi
commit
e772aed369
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      drivers/platform/x86/asus-wmi.c

+ 1 - 1
drivers/platform/x86/asus-wmi.c

@@ -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);
 
 		if (err < 0)
-			return err;
+			return 0; /* can't return negative here */
 	}
 
 	if (dev_id == ASUS_WMI_DEVID_FAN_CTRL) {