mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
IB/hns: checking for IS_ERR() instead of NULL
The hns_roce_v1_create_lp_qp() returns NULL on error, not error pointers.
Fixes: bfcc681bd0
("IB/hns: Fix the bug when free mr")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
931b3c1a83
commit
5db465f235
1 changed files with 1 additions and 1 deletions
|
@ -733,7 +733,7 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev)
|
|||
continue;
|
||||
|
||||
free_mr->mr_free_qp[i] = hns_roce_v1_create_lp_qp(hr_dev, pd);
|
||||
if (IS_ERR(free_mr->mr_free_qp[i])) {
|
||||
if (!free_mr->mr_free_qp[i]) {
|
||||
dev_err(dev, "Create loop qp failed!\n");
|
||||
goto create_lp_qp_failed;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue