From a9ed5b38aad704bbc250f9df2e9a29ee54388829 Mon Sep 17 00:00:00 2001 From: Leon Romanovsky Date: Wed, 21 Feb 2018 18:12:35 +0200 Subject: [PATCH] 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 --- drivers/infiniband/core/uverbs_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 2189a26bbe64..8d1547f5dc8e 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; } -- 2.30.2