提交 e64325e8 编写于 作者: A Armin Wolf 提交者: Guenter Roeck

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: NArmin Wolf <W_Armin@gmx.de>
Acked-by: NPali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20211021190531.17379-4-W_Armin@gmx.deSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 38c5b0dd
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册