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 <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Leon Romanovsky 2018-02-21 18:12:35 +02:00 committed by Doug Ledford
parent 43ae95130d
commit a9ed5b38aa
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}