mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-02 08:50:39 -05:00
RDMA: Fix allocation failure on pointer pd
The null check on an allocation failure on pd is currently checking
if pd is non-null rather than null. Fix this by adding the missing !
operator.
Fixes: 21a428a019 ("RDMA: Handle PD allocations by IB/core")
Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
This commit is contained in:
parent
d892273bb5
commit
e8ac9389f0
1 changed files with 1 additions and 1 deletions
|
|
@ -745,7 +745,7 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev)
|
|||
|
||||
ibdev = &hr_dev->ib_dev;
|
||||
pd = rdma_zalloc_drv_obj(ibdev, ib_pd);
|
||||
if (pd)
|
||||
if (!pd)
|
||||
goto alloc_mem_failed;
|
||||
|
||||
pd->device = ibdev;
|
||||
|
|
|
|||
Loading…
Reference in a new issue