lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 22 Apr 2017 16:48:47 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Devesh Sharma <devesh.sharma@...gotech.com>,
        Doug Ledford <dledford@...hat.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Selvin Xavier <selvin.xavier@...gotech.com>,
        Yuval Shaia <yuval.shaia@...cle.com>,
        linux-rdma@...r.kernel.org
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org, Wolfram Sang <wsa@...-dreams.de>
Subject: [PATCH v2 08/12] IB/ocrdma: Delete an error message for a failed
 memory allocation in ocrdma_add()

From: Markus Elfring <elfring@...rs.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@...rs.sourceforge.net>
Acked-by: Devesh Sharma <devesh.sharma@...adcom.com>
Reviewed-by: Yuval Shaia <yuval.shaia@...cle.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

Powered by blists - more mailing lists