From: Leon Romanovsky Date: Wed, 21 Feb 2018 16:12:35 +0000 (+0200) Subject: RDMA/uverbs: Return not supported error code for unsupported commands X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a9ed5b38aad704bbc250f9df2e9a29ee54388829;p=linux.git RDMA/uverbs: Return not supported error code for unsupported commands Command that doesn't exist means that it is not supported, so update code to return -EOPNOTSUPP in case of failure. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 2189a26bbe640..8d1547f5dc8e9 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -714,7 +714,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, } if (!verify_command_idx(command, extended_command)) { - ret = -EINVAL; + ret = -EOPNOTSUPP; goto out; }