From e64325e8c56e73bf6e143d0a621be9a0b9bcf21a Mon Sep 17 00:00:00 2001 From: Armin Wolf Date: Thu, 21 Oct 2021 21:05:29 +0200 Subject: hwmon: (dell-smm) Return -ENOIOCTLCMD instead of -EINVAL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- drivers/hwmon/dell-smm-hwmon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/hwmon/dell-smm-hwmon.c') 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 #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) -- cgit