From: Colin Ian King Date: Tue, 27 Oct 2020 09:09:42 +0000 (+0000) Subject: vsock: fix the error return when an invalid ioctl command is used X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c3e448cdc04071d1c420e7da87bafff22022a675;p=linux.git 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 Reviewed-by: Stefano Garzarella Signed-off-by: Jakub Kicinski --- diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 9c4cd822bd974..35613efbb1ec3 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;