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


Groups > linux.kernel > #1480702 > unrolled thread

[PATCH 02/13] DRBD-receiver: Delete an error message for a failed kmalloc_array() call

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2016-09-10 22:30 +0200
Last post2016-09-10 22:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 02/13] DRBD-receiver: Delete an error message for a failed  kmalloc_array() call SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-10 22:30 +0200

#1480702 — [PATCH 02/13] DRBD-receiver: Delete an error message for a failed kmalloc_array() call

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-09-10 22:30 +0200
Subject[PATCH 02/13] DRBD-receiver: Delete an error message for a failed kmalloc_array() call
Message-ID<sfX4t-4Pv-3@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 10 Sep 2016 19:26:07 +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>
---
 drivers/block/drbd/drbd_receiver.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 3be9fbf..dab3f74 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -4187,10 +4187,8 @@ static int receive_uuids(struct drbd_connection *connection, struct packet_info
 	device = peer_device->device;
 
 	p_uuid = kmalloc_array(UI_EXTENDED_SIZE, sizeof(*p_uuid), GFP_NOIO);
-	if (!p_uuid) {
-		drbd_err(device, "kmalloc of p_uuid failed\n");
+	if (!p_uuid)
 		return false;
-	}
 
 	for (i = UI_CURRENT; i < UI_EXTENDED_SIZE; i++)
 		p_uuid[i] = be64_to_cpu(p->uuid[i]);
-- 
2.10.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web