Message ID | 20250130075534.35847-1-a.vatoropin@crpt.ru (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | RDMA/erdma: Drop redundant NULL check on error path | expand |
diff --git a/drivers/infiniband/hw/erdma/erdma_verbs.c b/drivers/infiniband/hw/erdma/erdma_verbs.c index 51d619edb6c5..fe4b79f15cf6 100644 --- a/drivers/infiniband/hw/erdma/erdma_verbs.c +++ b/drivers/infiniband/hw/erdma/erdma_verbs.c @@ -794,10 +794,8 @@ static int get_mtt_entries(struct erdma_dev *dev, struct erdma_mem *mem, return 0; error_ret: - if (mem->umem) { - ib_umem_release(mem->umem); - mem->umem = NULL; - } + ib_umem_release(mem->umem); + mem->umem = NULL; return ret; }