[PATCH 20/29] IB/mlx4: Delete an error message for a failed memory allocation in mlx4_ib_add()

From: SF Markus Elfring
Date: Sat Feb 18 2017 - 16:10:42 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 18 Feb 2017 16:15:20 +0100

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@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/infiniband/hw/mlx4/main.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index 21b88d5ceda4..33b46c463ffa 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -2623,11 +2623,8 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
return NULL;

ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof(*ibdev));
- if (!ibdev) {
- dev_err(&dev->persist->pdev->dev,
- "Device struct alloc failed\n");
+ if (!ibdev)
return NULL;
- }

iboe = &ibdev->iboe;

--
2.11.1