diff options
author | Shiraz Saleem <shiraz.saleem@intel.com> | 2022-02-17 18:18:51 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-02-23 22:24:19 +0300 |
commit | 2322d17abf0a6c90251e8c0e419620c537e2875f (patch) | |
tree | 037f466e7ceedcc921740ca86166516cc6a8e91c /drivers/infiniband/hw/irdma/hw.c | |
parent | 45225a93ccc01a93f7fbffef4fcb2d9c649fe71e (diff) | |
download | linux-2322d17abf0a6c90251e8c0e419620c537e2875f.tar.xz |
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 <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/irdma/hw.c')
-rw-r--r-- | drivers/infiniband/hw/irdma/hw.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |