]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Fix usage of bitmap allocation functions return values
authorGal Pressman <pressmangal@gmail.com>
Thu, 9 Aug 2018 19:00:47 +0000 (22:00 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 15 Aug 2018 21:08:35 +0000 (15:08 -0600)
commitd75788d640932bae7f04d02eb905df2e7b4e669b
tree2bbf6771dd1b945148ae11e910a189c41e87f3d7
parentc9776a4ed268a53bea26e816331b24e071a7bcd6
RDMA/hns: Fix usage of bitmap allocation functions return values

hns bitmap allocation functions return 0 on success and -1 on failure.
Callers of these functions wrongly used their return value as an errno,
fix that by making a proper conversion.

Fixes: 13e099a3ba55 ("IB/hns: Simplify function of pd alloc and qp alloc")
Signed-off-by: Gal Pressman <pressmangal@gmail.com>
Acked-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_pd.c
drivers/infiniband/hw/hns/hns_roce_qp.c