projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38c5b0d
)
hwmon: (dell-smm) Return -ENOIOCTLCMD instead of -EINVAL
author
Armin Wolf
<W_Armin@gmx.de>
Thu, 21 Oct 2021 19:05:29 +0000
(21:05 +0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Thu, 21 Oct 2021 20:14:27 +0000
(13:14 -0700)
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>
drivers/hwmon/dell-smm-hwmon.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/dell-smm-hwmon.c
b/drivers/hwmon/dell-smm-hwmon.c
index b0c591bb761af42e5732e06d6d6c6d9789ccdd23..5f0338b4a71709c739e99143117d3733d35fe754 100644
(file)
--- 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 -E
INVAL
;
+ return -E
NOIOCTLCMD
;
}
if (val < 0)