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


Groups > linux.kernel > #1703373

[PATCH 1/4] axonram: Delete an error message for a failed memory allocation in axon_ram_probe()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 1/4] axonram: Delete an error message for a failed memory allocation in axon_ram_probe()
Date 2017-08-03 21:20 +0200
Message-ID <uatP4-4ko-31@gated-at.bofh.it> (permalink)
References <uatP3-4ko-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 3 Aug 2017 19:49:18 +0200

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

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/powerpc/sysdev/axonram.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 2799706106c6..b82d1b023a15 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -193,7 +193,6 @@ static int axon_ram_probe(struct platform_device *device)
 
 	bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL);
 	if (bank == NULL) {
-		dev_err(&device->dev, "Out of memory\n");
 		rc = -ENOMEM;
 		goto failed;
 	}
-- 
2.13.4

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


Thread

[PATCH 1/4] axonram: Delete an error message for a failed memory  allocation in axon_ram_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-08-03 21:20 +0200

csiph-web