mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 22:24:11 +08:00
net🏧fix up ENOIOCTLCMD error handling
At commit 07d106d0
, Linus pointed out that ENOIOCTLCMD should be
translated as ENOTTY to user mode.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3f8bdecd32
commit
4a2c240691
@ -432,7 +432,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg, int compat)
|
||||
size = dev->ops->ioctl(dev, cmd, buf);
|
||||
}
|
||||
if (size < 0) {
|
||||
error = (size == -ENOIOCTLCMD ? -EINVAL : size);
|
||||
error = (size == -ENOIOCTLCMD ? -ENOTTY : size);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user