aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-10-27 09:09:42 +0000
committerJakub Kicinski <kuba@kernel.org>2020-10-29 17:43:20 -0700
commitc3e448cdc04071d1c420e7da87bafff22022a675 (patch)
tree833fce3a9e1fcb182ede9ffb74b0cc8db9ba2484 /net
parentvsock: remove ratelimit unknown ioctl message (diff)
downloadlinux-dev-c3e448cdc04071d1c420e7da87bafff22022a675.tar.xz
linux-dev-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')
-rw-r--r--net/vmw_vsock/af_vsock.c2
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;