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

Commit d430fb99 authored by Markus Elfring's avatar Markus Elfring Committed by Rafael J. Wysocki
Browse files

cpufreq: s3c24xx: Drop memory allocation error messages from two functions



Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 3e3b507e
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -473,10 +473,8 @@ int __init s3c_cpufreq_setboard(struct s3c_cpufreq_board *board)
	 * initdata. */

	ours = kzalloc(sizeof(*ours), GFP_KERNEL);
	if (ours == NULL) {
		pr_err("%s: no memory\n", __func__);
	if (!ours)
		return -ENOMEM;
	}

	*ours = *board;
	cpu_cur.board = ours;
@@ -562,10 +560,8 @@ static int s3c_cpufreq_build_freq(void)
	size++;

	ftab = kzalloc(sizeof(*ftab) * size, GFP_KERNEL);
	if (!ftab) {
		pr_err("%s: no memory for tables\n", __func__);
	if (!ftab)
		return -ENOMEM;
	}

	ftab_size = size;