ソースを参照

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>
Leon Romanovsky 7 年 前
コミット
a9ed5b38aa
1 ファイル変更1 行追加1 行削除
  1. 1 1
      drivers/infiniband/core/uverbs_main.c

+ 1 - 1
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;
 	}