summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/sfi-cpufreq.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-09-16 21:44:25 +0200
committerMark Brown <broonie@kernel.org>2015-09-16 21:44:25 +0200
commit92243b6fc8fcb16bf401b055f7a0ba79f70a4115 (patch)
tree08e9fa205efb9bfab23b6ea59fc0a3eaa3fed82b /drivers/cpufreq/sfi-cpufreq.c
parentspi: Fix documentation of spi_alloc_master() (diff)
parentLinux 4.3-rc1 (diff)
downloadlinux-92243b6fc8fcb16bf401b055f7a0ba79f70a4115.tar.xz
linux-92243b6fc8fcb16bf401b055f7a0ba79f70a4115.zip
Merge tag 'v4.3-rc1' into spi-fix-doc
Linux 4.3-rc1
Diffstat (limited to 'drivers/cpufreq/sfi-cpufreq.c')
-rw-r--r--drivers/cpufreq/sfi-cpufreq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/cpufreq/sfi-cpufreq.c b/drivers/cpufreq/sfi-cpufreq.c
index ffa3389e535b..992ce6f9abec 100644
--- a/drivers/cpufreq/sfi-cpufreq.c
+++ b/drivers/cpufreq/sfi-cpufreq.c
@@ -45,12 +45,10 @@ static int sfi_parse_freq(struct sfi_table_header *table)
pentry = (struct sfi_freq_table_entry *)sb->pentry;
totallen = num_freq_table_entries * sizeof(*pentry);
- sfi_cpufreq_array = kzalloc(totallen, GFP_KERNEL);
+ sfi_cpufreq_array = kmemdup(pentry, totallen, GFP_KERNEL);
if (!sfi_cpufreq_array)
return -ENOMEM;
- memcpy(sfi_cpufreq_array, pentry, totallen);
-
return 0;
}