summaryrefslogtreecommitdiffstats
path: root/net/vmw_vsock
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/vmw_vsock
parent6bc8f20c1d9348bdf9ce387228c1b16ce4a301ad (diff)
downloadlinux-c3e448cdc04071d1c420e7da87bafff22022a675.tar.bz2
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')
-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;