Skip to content

Commit e64325e

Browse files
Wer-Wolfgroeck
authored andcommitted
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 <[email protected]> Acked-by: Pali Rohár <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 38c5b0d commit e64325e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/hwmon/dell-smm-hwmon.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/delay.h>
1919
#include <linux/dmi.h>
2020
#include <linux/err.h>
21+
#include <linux/errno.h>
2122
#include <linux/hwmon.h>
2223
#include <linux/init.h>
2324
#include <linux/module.h>
@@ -516,7 +517,7 @@ i8k_ioctl_unlocked(struct file *fp, struct dell_smm_data *data, unsigned int cmd
516517
break;
517518

518519
default:
519-
return -EINVAL;
520+
return -ENOIOCTLCMD;
520521
}
521522

522523
if (val < 0)

0 commit comments

Comments
 (0)