diff options
author | Armin Wolf <W_Armin@gmx.de> | 2021-10-21 21:05:29 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2021-10-21 13:14:27 -0700 |
commit | e64325e8c56e73bf6e143d0a621be9a0b9bcf21a (patch) | |
tree | f432064dc35d2cd572aafe893e734d75147408e4 /drivers/hwmon | |
parent | 38c5b0dd7d3092c24fc3dbd9ca963fd0e11752f5 (diff) |
hwmon: (dell-smm) Return -ENOIOCTLCMD instead of -EINVAL
Returning -ENOIOCTLCMD gives the callers a better
hint of what went wrong and is the recommended
behavior.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Acked-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20211021190531.17379-4-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/dell-smm-hwmon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index b0c591bb761a..5f0338b4a717 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -18,6 +18,7 @@ #include <linux/delay.h> #include <linux/dmi.h> #include <linux/err.h> +#include <linux/errno.h> #include <linux/hwmon.h> #include <linux/init.h> #include <linux/module.h> @@ -516,7 +517,7 @@ i8k_ioctl_unlocked(struct file *fp, struct dell_smm_data *data, unsigned int cmd break; default: - return -EINVAL; + return -ENOIOCTLCMD; } if (val < 0) |