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


Groups > linux.kernel > #1743232 > unrolled thread

[PATCH 4/6] ARM: s3c24xx: Delete an error message for a failed memory allocation in s3c2412_iotiming_get()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-10-02 22:50 +0200
Last post2017-10-02 22:50 +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 4/6] ARM: s3c24xx: Delete an error message for a failed memory  allocation in s3c2412_iotiming_get() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-10-02 22:50 +0200

#1743232 — [PATCH 4/6] ARM: s3c24xx: Delete an error message for a failed memory allocation in s3c2412_iotiming_get()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-10-02 22:50 +0200
Subject[PATCH 4/6] ARM: s3c24xx: Delete an error message for a failed memory allocation in s3c2412_iotiming_get()
Message-ID<uwfP5-ur-35@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 2 Oct 2017 19:37:07 +0200

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

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
index 28b13951de87..f09d5d5ea7ed 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
@@ -243,10 +243,8 @@ int s3c2412_iotiming_get(struct s3c_cpufreq_config *cfg,
 			continue;
 
 		bt = kzalloc(sizeof(struct s3c2412_iobank_timing), GFP_KERNEL);
-		if (!bt) {
-			printk(KERN_ERR "%s: no memory for bank\n", __func__);
+		if (!bt)
 			return -ENOMEM;
-		}
 
 		timings->bank[bank].io_2412 = bt;
 		s3c2412_iotiming_getbank(cfg, bt, bank);
-- 
2.14.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web