mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
gpib: Fix inappropriate ioctl error return
The driver was returning -ENOTTY in the case the ioctl command
was not recognised. Change it to -EBADRQC.
Fixes: 9dde4559e9 ("staging: gpib: Add GPIB common core driver")
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Link: https://patch.msgid.link/20260411102025.2000-3-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
89f34ef577
commit
70ea440324
|
|
@ -606,7 +606,7 @@ long ibioctl(struct file *filep, unsigned int cmd, unsigned long arg)
|
|||
unsigned int minor = iminor(file_inode(filep));
|
||||
struct gpib_board *board;
|
||||
struct gpib_file_private *file_priv = filep->private_data;
|
||||
long retval = -ENOTTY;
|
||||
long retval = -EBADRQC;
|
||||
|
||||
if (minor >= GPIB_MAX_NUM_BOARDS) {
|
||||
pr_err("gpib: invalid minor number of device file\n");
|
||||
|
|
@ -799,7 +799,6 @@ long ibioctl(struct file *filep, unsigned int cmd, unsigned long arg)
|
|||
mutex_unlock(&board->big_gpib_mutex);
|
||||
return write_ioctl(file_priv, board, arg);
|
||||
default:
|
||||
retval = -ENOTTY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user