Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628850

[PATCH v2 08/12] IB/ocrdma: Delete an error message for a failed memory allocation in ocrdma_add()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH v2 08/12] IB/ocrdma: Delete an error message for a failed memory allocation in ocrdma_add()
Date 2017-04-22 16:50 +0200
Message-ID <tz4wi-44M-9@gated-at.bofh.it> (permalink)
References <tiJct-6C3-9@gated-at.bofh.it> <tz4cW-3Ys-11@gated-at.bofh.it> <tz4cW-3Ys-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 22 Apr 2017 14:36:30 +0200

Omit an extra message for a memory allocation failure in this function.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Devesh Sharma <devesh.sharma@broadcom.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
---
 drivers/infiniband/hw/ocrdma/ocrdma_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
index b82f6c6942e0..d3942558b083 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
@@ -304,10 +304,9 @@ static struct ocrdma_dev *ocrdma_add(struct be_dev_info *dev_info)
 	struct ocrdma_dev *dev;
 
 	dev = (struct ocrdma_dev *)ib_alloc_device(sizeof(*dev));
-	if (!dev) {
-		pr_err("Unable to allocate ib device\n");
+	if (!dev)
 		return NULL;
-	}
+
 	dev->mbx_cmd = kzalloc(sizeof(struct ocrdma_mqe_emb_cmd), GFP_KERNEL);
 	if (!dev->mbx_cmd)
 		goto idr_err;
-- 
2.12.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/12] InfiniBand-OCRDMA: Fine-tuning for several function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 16:30 +0200
  [PATCH v2 01/12] IB/ocrdma: Use kcalloc() in  ocrdma_mbx_alloc_pd_range() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 16:40 +0200
    Re: [PATCH v2 01/12] IB/ocrdma: Use kcalloc() in ocrdma_mbx_alloc_pd_range() Devesh Sharma <devesh.sharma@broadcom.com> - 2017-04-24 18:30 +0200
  [PATCH v2 02/12] IB/ocrdma: Use kcalloc() in five functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 16:40 +0200
  [PATCH v2 03/12] IB/ocrdma: Improve size determinations in ten  functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 16:40 +0200
    Re: [PATCH v2 03/12] IB/ocrdma: Improve size determinations in ten  functions Leon Romanovsky <leon@kernel.org> - 2017-04-23 09:40 +0200
      Re: [PATCH v2 03/12] IB/ocrdma: Improve size determinations in ten  functions Dennis Dalessandro <dennis.dalessandro@intel.com> - 2017-04-24 15:00 +0200
        Re: IB/ocrdma: Improve size determinations in ten functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-24 15:30 +0200
          Re: IB/ocrdma: Improve size determinations in ten functions Leon Romanovsky <leon@kernel.org> - 2017-04-24 16:40 +0200
            Re: IB/ocrdma: Improve size determinations in ten functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-24 17:00 +0200
        Re: [PATCH v2 03/12] IB/ocrdma: Improve size determinations in ten  functions Doug Ledford <dledford@redhat.com> - 2017-04-24 18:40 +0200
          Re: [PATCH v2 03/12] IB/ocrdma: Improve size determinations in ten  functions Leon Romanovsky <leon@kernel.org> - 2017-04-24 20:10 +0200
      Re: [PATCH v2 03/12] IB/ocrdma: Improve size determinations in ten  functions Doug Ledford <dledford@redhat.com> - 2017-04-24 18:40 +0200
  [PATCH v2 07/12] IB/ocrdma: Adjust 21 checks for null pointers SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 16:50 +0200
    Re: [PATCH v2 07/12] IB/ocrdma: Adjust 21 checks for null pointers Leon Romanovsky <leon@kernel.org> - 2017-04-23 08:10 +0200
  [PATCH v2 04/12] IB/ocrdma: Delete unnecessary variable  initialisations in ocrdma_mbx_get_dcbx_config() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 16:50 +0200
  [PATCH v2 08/12] IB/ocrdma: Delete an error message for a failed  memory allocation in ocrdma_add() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 16:50 +0200
  [PATCH v2 06/12] IB/ocrdma: Use kmalloc_array() in  ocrdma_create_srq() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 16:50 +0200
  [PATCH v2 05/12] IB/ocrdma: Delete unnecessary braces SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 16:50 +0200
  [PATCH v2 11/12] IB/ocrdma: Delete an unnecessary variable in  ocrdma_dealloc_pd() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 17:00 +0200
  [PATCH v2 12/12] IB/ocrdma: One jump label less in  ocrdma_alloc_ucontext_pd() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 17:00 +0200
  [PATCH v2 09/12] IB/ocrdma: Delete an unnecessary variable assignment  in ocrdma_alloc_mr() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 17:00 +0200
  [PATCH v2 10/12] IB/ocrdma: Returning only value constants in  ocrdma_resize_cq() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-04-22 17:00 +0200

csiph-web