ARM: s3c24xx: Remove printk for failed memory allocation in iotiming get
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 2 Oct 2017 17:14:20 +0000 (19:14 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Wed, 4 Oct 2017 18:40:09 +0000 (20:40 +0200)
Omit an extra message for a memory allocation failure in
s3c2410_iotiming_get() and s3c2412_iotiming_get().

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
arch/arm/mach-s3c24xx/iotiming-s3c2410.c
arch/arm/mach-s3c24xx/iotiming-s3c2412.c

index b7970f1fa3d5f47576be237fbbb612494dba32b6..f587c78fba33e8be31c613373de98a2e0a40cc33 100644 (file)
@@ -454,10 +454,8 @@ int s3c2410_iotiming_get(struct s3c_cpufreq_config *cfg,
                               __func__, bank, bankcon);
 
                bt = kzalloc(sizeof(struct s3c2410_iobank_timing), GFP_KERNEL);
-               if (!bt) {
-                       printk(KERN_ERR "%s: no memory for bank\n", __func__);
+               if (!bt)
                        return -ENOMEM;
-               }
 
                /* find out in nWait is enabled for bank. */
 
index 28b13951de8783fb3160b486889d7c6eee798499..f09d5d5ea7ed3759ed6e745b6d1745e503182ed8 100644 (file)
@@ -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);