lkml.org 
[lkml]   [2020]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] vsock: fix the error return when an invalid ioctl command is used
Date
From: Colin Ian King <colin.king@canonical.com>

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>
---
net/vmw_vsock/af_vsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 865331b809e4..597c86413089 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;
--
2.27.0
\
 
 \ /
  Last update: 2020-10-27 10:11    [W:0.942 / U:1.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site