diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-02-15 17:28:40 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-02-27 18:29:01 +0100 |
commit | d430fb998451eb99f5592c003598e8324976f0cd (patch) | |
tree | 69428b60574b5f90a43703c2f236105581473ed0 /drivers/cpufreq/s3c24xx-cpufreq.c | |
parent | cpufreq: tegra186: Break after initialization is done for policy->cpu (diff) | |
download | linux-d430fb998451eb99f5592c003598e8324976f0cd.tar.xz linux-d430fb998451eb99f5592c003598e8324976f0cd.zip |
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: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/s3c24xx-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/s3c24xx-cpufreq.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c index 7b596fa38ad2..024afd0b9458 100644 --- a/drivers/cpufreq/s3c24xx-cpufreq.c +++ b/drivers/cpufreq/s3c24xx-cpufreq.c @@ -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; |