ARM: s3c24xx: Remove printk for failed memory allocation in iotiming get

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>
This commit is contained in:
Markus Elfring 2017-10-02 19:14:20 +02:00 committed by Krzysztof Kozlowski
parent 2bd6bf03f4
commit b3b391f8e4
2 changed files with 2 additions and 6 deletions

View 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. */

View 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);