Leon Romanovsky 3c638cdb8e RDMA/restrack: Don't treat as an error allocation ID wrapping
xa_alloc_cyclic() call returns positive number if ID allocation
succeeded but wrapped. It is not an error, so normalize the "ret"
variable to zero as marker of not-an-error.

   drivers/infiniband/core/restrack.c:261 rdma_restrack_add()
   warn: 'ret' can be either negative or positive

Fixes: fd47c2f99f04 ("RDMA/restrack: Convert internal DB from hash to XArray")
Link: https://lore.kernel.org/r/20201216100753.1127638-1-leon@kernel.org
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-01-07 14:31:40 -04:00
..
2020-01-25 15:11:37 -04:00
2020-12-16 13:42:26 -08:00
2020-12-10 15:05:17 -04:00
2020-03-04 14:28:25 -04:00
2020-12-07 15:45:00 -04:00
2020-08-06 16:43:36 -07:00
2019-06-28 21:18:23 -03:00
2018-12-12 07:40:16 -07:00
2020-11-17 15:22:07 -04:00
2020-12-07 15:45:00 -04:00
2018-12-12 07:40:16 -07:00
2020-07-06 14:54:46 -03:00