mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04: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 <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
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