Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3b391f8 authored by Markus Elfring's avatar Markus Elfring Committed by Krzysztof Kozlowski
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent 2bd6bf03
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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. */

+1 −3
Original line number Diff line number Diff line
@@ -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);