Re: [PATCH -next] RDMA/hns: Fix return in hns_roce_rereg_user_mr()

From: Jason Gunthorpe
Date: Thu Aug 19 2021 - 10:18:44 EST


On Wed, Aug 04, 2021 at 08:59:39PM +0800, YueHaibing wrote:
> If re-registering an MR in hns_roce_rereg_user_mr(), we should
> return NULL instead of pass 0 to ERR_PTR.
>
> Fixes: 4e9fc1dae2a9 ("RDMA/hns: Optimize the MR registration process")
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
> drivers/infiniband/hw/hns/hns_roce_mr.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)

Applied to for-next, though hns should be checked to ensure MRs are
not left in some broken state after rereg failure.

Thanks,
Jason