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

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

cpufreq: powernow-k8: Drop memory allocation error messages from three 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 d6b96e47
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -591,10 +591,8 @@ static int fill_powernow_table(struct powernow_k8_data *data,

	powernow_table = kzalloc((sizeof(*powernow_table)
		* (data->numps + 1)), GFP_KERNEL);
	if (!powernow_table) {
		pr_err("powernow_table memory alloc failure\n");
	if (!powernow_table)
		return -ENOMEM;
	}

	for (j = 0; j < data->numps; j++) {
		int freq;
@@ -760,10 +758,8 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
	/* fill in data->powernow_table */
	powernow_table = kzalloc((sizeof(*powernow_table)
		* (data->acpi_data.state_count + 1)), GFP_KERNEL);
	if (!powernow_table) {
		pr_debug("powernow_table memory alloc failure\n");
	if (!powernow_table)
		goto err_out;
	}

	/* fill in data */
	data->numps = data->acpi_data.state_count;
@@ -1042,10 +1038,8 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
		return -ENODEV;

	data = kzalloc(sizeof(*data), GFP_KERNEL);
	if (!data) {
		pr_err("unable to alloc powernow_k8_data\n");
	if (!data)
		return -ENOMEM;
	}

	data->cpu = pol->cpu;