From 2322d17abf0a6c90251e8c0e419620c537e2875f Mon Sep 17 00:00:00 2001 From: Shiraz Saleem Date: Thu, 17 Feb 2022 09:18:51 -0600 Subject: RDMA/irdma: Remove excess error variables As irdma_status_code is replaced with an int, there is no need for two variables to hold error codes. Remove the excess variable in functions where this occurs. Also, remove any redundant initializations which are no longer needed. Link: https://lore.kernel.org/r/20220217151851.1518-4-shiraz.saleem@intel.com Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/irdma/hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/infiniband/hw/irdma/hw.c') diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c index 93b71357ba98..58cee86b4e35 100644 --- a/drivers/infiniband/hw/irdma/hw.c +++ b/drivers/infiniband/hw/irdma/hw.c @@ -1298,10 +1298,10 @@ del_ceqs: static int irdma_create_virt_aeq(struct irdma_pci_f *rf, u32 size) { - int status = -ENOMEM; struct irdma_aeq *aeq = &rf->aeq; dma_addr_t *pg_arr; u32 pg_cnt; + int status; if (rf->rdma_ver < IRDMA_GEN_2) return -EOPNOTSUPP; @@ -1310,7 +1310,7 @@ static int irdma_create_virt_aeq(struct irdma_pci_f *rf, u32 size) aeq->mem.va = vzalloc(aeq->mem.size); if (!aeq->mem.va) - return status; + return -ENOMEM; pg_cnt = DIV_ROUND_UP(aeq->mem.size, PAGE_SIZE); status = irdma_get_pble(rf->pble_rsrc, &aeq->palloc, pg_cnt, true); -- cgit v1.2.3