RDMA/hns: Clean up the return value check of hns_roce_alloc_cmd_mailbox()
authorWenpeng Liang <liangwenpeng@huawei.com>
Wed, 2 Mar 2022 06:48:28 +0000 (14:48 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 4 Mar 2022 21:36:32 +0000 (17:36 -0400)
commit904de76c42b7d758e75197f8d532a1ffafc3caad
treee3ac110165bc1c5f46c706375c6eff47cb7783b4
parentcf7f8f5c1c541ece6ec265432c8cf22a6edf067b
RDMA/hns: Clean up the return value check of hns_roce_alloc_cmd_mailbox()

hns_roce_alloc_cmd_mailbox() never returns NULL, so the check should be
IS_ERR(). And the error code should be converted as the function's return
value.

Link: https://lore.kernel.org/r/20220302064830.61706-8-liangwenpeng@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_mr.c
drivers/infiniband/hw/hns/hns_roce_srq.c