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>
This commit is contained in:
Colin Ian King 2020-10-27 09:09:42 +00:00 committed by Jakub Kicinski
parent 6bc8f20c1d
commit c3e448cdc0

View File

@ -2072,7 +2072,7 @@ static long vsock_dev_do_ioctl(struct file *filp,
break; break;
default: default:
retval = -EINVAL; retval = -ENOIOCTLCMD;
} }
return retval; return retval;