From: Armin Wolf Date: Thu, 21 Oct 2021 19:05:29 +0000 (+0200) Subject: hwmon: (dell-smm) Return -ENOIOCTLCMD instead of -EINVAL X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e64325e8c56e73bf6e143d0a621be9a0b9bcf21a;p=linux.git 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 Acked-by: Pali Rohár Link: https://lore.kernel.org/r/20211021190531.17379-4-W_Armin@gmx.de Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index b0c591bb761af..5f0338b4a7170 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -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)