RDMA/hns: Fix return in hns_roce_rereg_user_mr()
authorYueHaibing <yuehaibing@huawei.com>
Wed, 4 Aug 2021 12:59:39 +0000 (20:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:41:54 +0000 (13:41 +0200)
commitaf1d43d9736e91c0811e4e34eaa12f01099682b7
treebb7d69325467420c222c7082900072013e059b53
parent31ebd03a6603e4e0c4883108a19ff712a51c0207
RDMA/hns: Fix return in hns_roce_rereg_user_mr()

[ Upstream commit c4c7d7a43246a42b0355692c3ed53dff7cbb29bb ]

If re-registering an MR in hns_roce_rereg_user_mr(), we should return NULL
instead of passing 0 to ERR_PTR for clarity.

Fixes: 4e9fc1dae2a9 ("RDMA/hns: Optimize the MR registration process")
Link: https://lore.kernel.org/r/20210804125939.20516-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_mr.c