From: Viresh Kumar Date: Wed, 18 May 2016 12:25:26 +0000 (+0530) Subject: cpufreq: governor: Remove prints from allocation failures X-Git-Tag: v4.8-rc1~158^2~3^2~14^2~3^2~4^2~15 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a69d6b2914865965acc6df95d1aac7ff8ca35094;p=karo-tx-linux.git cpufreq: governor: Remove prints from allocation failures These aren't required anymore as the allocation core already prints such messages. Remove the redundant ones. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 2568508fca38..78faa9fbc384 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -273,10 +273,8 @@ static int cs_init(struct dbs_data *dbs_data, bool notify) struct cs_dbs_tuners *tuners; tuners = kzalloc(sizeof(*tuners), GFP_KERNEL); - if (!tuners) { - pr_err("%s: kzalloc failed\n", __func__); + if (!tuners) return -ENOMEM; - } tuners->down_threshold = DEF_FREQUENCY_DOWN_THRESHOLD; tuners->freq_step = DEF_FREQUENCY_STEP; diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 09d6c0c405e4..4441a11139f1 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -368,10 +368,8 @@ static int od_init(struct dbs_data *dbs_data, bool notify) int cpu; tuners = kzalloc(sizeof(*tuners), GFP_KERNEL); - if (!tuners) { - pr_err("%s: kzalloc failed\n", __func__); + if (!tuners) return -ENOMEM; - } cpu = get_cpu(); idle_time = get_cpu_idle_time_us(cpu, NULL);