Skip to content

Commit

Permalink
RDMA/bnxt_re: Delete two error messages for a failed memory allocatio…
Browse files Browse the repository at this point in the history
…n in bnxt_qplib_alloc_dpi_tbl()

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Devesh Sharma <devesh.sharma@broadcom.com>
Acked-by: Jonathan Toppins <jtoppins@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Markus Elfring authored and Jason Gunthorpe committed Feb 1, 2018
1 parent 316663c commit f390b71
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/infiniband/hw/bnxt_re/qplib_res.c
Original file line number Diff line number Diff line change
@@ -707,8 +707,6 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res,
dpit->app_tbl = kcalloc(dpit->max, sizeof(void *), GFP_KERNEL);
if (!dpit->app_tbl) {
pci_iounmap(res->pdev, dpit->dbr_bar_reg_iomem);
dev_err(&res->pdev->dev,
"QPLIB: DPI app tbl allocation failed");
return -ENOMEM;
}

@@ -721,9 +719,6 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res,
pci_iounmap(res->pdev, dpit->dbr_bar_reg_iomem);
kfree(dpit->app_tbl);
dpit->app_tbl = NULL;
dev_err(&res->pdev->dev,
"QPLIB: DPI tbl allocation failed for size = %d",
bytes);
return -ENOMEM;
}

0 comments on commit f390b71

Please sign in to comment.