diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-10-27 10:09:42 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-30 01:43:20 +0100 |
commit | c3e448cdc04071d1c420e7da87bafff22022a675 (patch) | |
tree | 833fce3a9e1fcb182ede9ffb74b0cc8db9ba2484 /net/vmw_vsock/af_vsock.c | |
parent | vsock: remove ratelimit unknown ioctl message (diff) | |
download | linux-c3e448cdc04071d1c420e7da87bafff22022a675.tar.xz linux-c3e448cdc04071d1c420e7da87bafff22022a675.zip |
vsock: fix the error return when an invalid ioctl command is used
Currently when an invalid ioctl command is used the error return
is -EINVAL. Fix this by returning the correct error -ENOIOCTLCMD.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/vmw_vsock/af_vsock.c')
-rw-r--r-- | net/vmw_vsock/af_vsock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 9c4cd822bd97..35613efbb1ec 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -2072,7 +2072,7 @@ static long vsock_dev_do_ioctl(struct file *filp, break; default: - retval = -EINVAL; + retval = -ENOIOCTLCMD; } return retval; |