projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
931b3c1
)
IB/hns: checking for IS_ERR() instead of NULL
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 4 Aug 2017 08:12:08 +0000
(11:12 +0300)
committer
Doug Ledford
<dledford@redhat.com>
Fri, 4 Aug 2017 19:09:56 +0000
(15:09 -0400)
The hns_roce_v1_create_lp_qp() returns NULL on error, not error pointers.
Fixes:
bfcc681bd09d
("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>
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index
23fad6d
..
2540b65
100644
(file)
--- a/
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
+++ b/
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
@@
-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;
}