]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
RDMA/mlx5: Return proper value for not-supported command
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 13 Mar 2018 13:29:25 +0000 (15:29 +0200)
committerDoug Ledford <dledford@redhat.com>
Thu, 15 Mar 2018 14:59:58 +0000 (10:59 -0400)
Return -EOPNOTSUPP value to the user for unsupported reg_user_mr.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/mr.c

index c7a8ece05bd21903002f204a617a3091a917dbf7..9a8018cd320afa6a5d114fe6adce1974c26e0bc3 100644 (file)
@@ -1220,7 +1220,7 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
        bool use_umr = true;
 
        if (!IS_ENABLED(CONFIG_INFINIBAND_USER_MEM))
-               return ERR_PTR(-EINVAL);
+               return ERR_PTR(-EOPNOTSUPP);
 
        mlx5_ib_dbg(dev, "start 0x%llx, virt_addr 0x%llx, length 0x%llx, access_flags 0x%x\n",
                    start, virt_addr, length, access_flags);