aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches-4.1/302-mtd-qcom-smem-rename-rootfs-ubi.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-09-10 10:09:42 +0000
committerJonas Gorski <jogo@openwrt.org>2015-09-10 10:09:42 +0000
commit82fb27917b9cf62f3c9f0ad1bc7db0e83c5eccbc (patch)
tree76a0aaf6592d66154279f499c601c0270336b1ab /target/linux/ipq806x/patches-4.1/302-mtd-qcom-smem-rename-rootfs-ubi.patch
parentbebff6364d674b8e6cd23303fe7dc9d331acf6f5 (diff)
downloadupstream-82fb27917b9cf62f3c9f0ad1bc7db0e83c5eccbc.tar.gz
upstream-82fb27917b9cf62f3c9f0ad1bc7db0e83c5eccbc.tar.bz2
upstream-82fb27917b9cf62f3c9f0ad1bc7db0e83c5eccbc.zip
ipq806x: fix uninitialized variable usage in cpufreq-krait
In krait_cpufreq_probe, both freq and max_cpu_freq are never initialized, so the max_cpu_freq will have a random value at the end. Fix this by properly initializing max_cpu_freq to 0 and storing the clk frequency in freq as well, to make it similar to how it's calculated in krait_set_target. Fixes the following warnings: In file included from include/linux/clk.h:16:0, from drivers/cpufreq/cpufreq-krait.c:13: drivers/cpufreq/cpufreq-krait.c: In function 'krait_cpufreq_probe': include/linux/kernel.h:714:24: warning: 'freq' may be used uninitialized in this function [-Wmaybe-uninitialized] _max1 > _max2 ? _max1 : _max2; }) ^ drivers/cpufreq/cpufreq-krait.c:217:25: note: 'freq' was declared here unsigned long freq_Hz, freq, max_cpu_freq; ^ In file included from include/linux/clk.h:16:0, from drivers/cpufreq/cpufreq-krait.c:13: include/linux/kernel.h:714:24: warning: 'max_cpu_freq' may be used uninitialized in this function [-Wmaybe-uninitialized] _max1 > _max2 ? _max1 : _max2; }) ^ drivers/cpufreq/cpufreq-krait.c:217:31: note: 'max_cpu_freq' was declared here unsigned long freq_Hz, freq, max_cpu_freq; Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46839
Diffstat (limited to 'target/linux/ipq806x/patches-4.1/302-mtd-qcom-smem-rename-rootfs-ubi.patch')
0 files changed, 0 insertions, 0 deletions