linux/drivers/cpufreq
Wen Yang 7c468966f0 cpufreq: kirkwood: fix possible object reference leak
The call to of_get_child_by_name returns a node pointer with refcount
incremented thus it must be explicitly decremented after the last
usage.

Detected by coccinelle with the following warnings:
./drivers/cpufreq/kirkwood-cpufreq.c:127:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 118, but without a corresponding object release within this function.
./drivers/cpufreq/kirkwood-cpufreq.c:133:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 118, but without a corresponding object release within this function.

and also do some cleanup:
- of_node_put(np);
- np = NULL;
...
of_node_put(np);

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-04-08 15:35:24 +05:30
..
acpi-cpufreq.c cpufreq: acpi-cpufreq: Report if CPU doesn't support boost technologies 2019-02-20 13:16:06 +01:00
amd_freq_sensitivity.c cpufreq: Add Hygon Dhyana support 2018-09-27 18:29:00 +02:00
arm_big_little.c cpufreq: arm_big_little: Register an Energy Model 2019-02-07 09:55:11 +05:30
arm_big_little.h cpufreq: arm_big_little: make function arguments and structure pointer const 2017-11-08 23:22:19 +01:00
armada-8k-cpufreq.c cpufreq: ap806: fix possible object reference leak 2019-04-08 15:35:24 +05:30
armada-37xx-cpufreq.c cpufreq: armada-37xx: Add AVS support 2018-07-18 10:10:25 +02:00
bmips-cpufreq.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
brcmstb-avs-cpufreq.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
cppc_cpufreq.c cpufreq / cppc: Work around for Hisilicon CPPC cpufreq 2019-02-18 11:27:42 +01:00
cpufreq_conservative.c cpufreq: conservative: Take limits changes into account properly 2018-10-16 12:34:45 +02:00
cpufreq_governor_attr_set.c cpufreq: governor: Move abstract gov_attr_set code to seperate file 2016-04-02 01:09:01 +02:00
cpufreq_governor.c cpufreq/cpufreq_governor: Replace synchronize_sched() with synchronize_rcu() 2018-11-27 09:21:38 -08:00
cpufreq_governor.h cpufreq: Replace "max_transition_latency" with "dynamic_switching" 2017-07-26 00:15:45 +02:00
cpufreq_ondemand.c cpufreq: governor: Drop min_sampling_rate 2017-07-22 02:25:20 +02:00
cpufreq_ondemand.h cpufreq: ondemand: Don't keep a copy of freq_table pointer 2016-06-09 00:58:06 +02:00
cpufreq_performance.c cpufreq: governor: Get rid of governor events 2016-06-02 23:24:15 +02:00
cpufreq_powersave.c cpufreq: governor: Get rid of governor events 2016-06-02 23:24:15 +02:00
cpufreq_stats.c cpufreq: stats: Fix concurrency issues while resetting stats 2019-02-01 11:52:11 +01:00
cpufreq_userspace.c cpufreq: governor: Get rid of governor events 2016-06-02 23:24:15 +02:00
cpufreq-dt-platdev.c cpufreq: dt-platdev: add Tegra210 to blacklist 2019-02-06 14:31:19 +01:00
cpufreq-dt.c Merge branch 'pm-opp' 2019-03-04 11:19:14 +01:00
cpufreq-dt.h cpufreq: dt: Allow platform specific suspend/resume callbacks 2018-05-10 11:43:59 +02:00
cpufreq-nforce2.c cpufreq: nforce2: Remove meaningless return 2018-12-11 12:11:46 +01:00
cpufreq.c cpufreq: Improve kerneldoc comments for cpufreq_cpu_get/put() 2019-03-07 10:55:29 +01:00
davinci-cpufreq.c cpufreq: davinci: move configuration to include/linux/platform_data 2019-02-18 11:58:08 +05:30
e_powersaver.c cpufreq: e_powersaver: Use struct_size() in kzalloc() 2019-01-15 22:58:59 +01:00
elanfreq.c cpufreq: elanfreq: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
freq_table.c cpufreq: Drop cpufreq_table_validate_and_show() 2018-04-10 08:40:45 +02:00
gx-suspmod.c cpufreq: Add CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING cpufreq driver flag 2017-07-26 00:15:46 +02:00
highbank-cpufreq.c
ia64-acpi-cpufreq.c cpufreq: ia64: Remove unused header files 2018-12-11 12:11:46 +01:00
imx6q-cpufreq.c cpufreq: imx6q: fix possible object reference leak 2019-04-08 15:35:24 +05:30
intel_pstate.c cpufreq: intel_pstate: Fix up iowait_boost computation 2019-03-12 09:47:30 +01:00
Kconfig thermal: cpu_cooling: Require thermal core to be compiled in 2019-01-29 11:46:31 +01:00
Kconfig.arm Power management updates for 5.1-rc1 2019-03-06 12:59:46 -08:00
Kconfig.powerpc
Kconfig.x86 sched/x86: Change CONFIG_SCHED_ITMT to CONFIG_SCHED_MC_PRIO 2016-11-30 08:27:08 +01:00
kirkwood-cpufreq.c cpufreq: kirkwood: fix possible object reference leak 2019-04-08 15:35:24 +05:30
longhaul.c cpufreq: longhaul: remove unneeded semicolon 2019-02-18 10:27:38 +05:30
longhaul.h
longrun.c cpufreq: Don't set transition_latency for setpolicy drivers 2017-07-26 00:15:43 +02:00
loongson1-cpufreq.c CPUFREQ: Loongson1: Replace goto out with return in ls1x_cpufreq_probe() 2016-05-13 14:02:08 +02:00
loongson2_cpufreq.c cpufreq: Loongson2: constify platform_device_id 2017-08-18 01:44:21 +02:00
Makefile cpufreq: ap806: add cpufreq driver for Armada 8K 2019-02-07 10:01:51 +05:30
maple-cpufreq.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
mediatek-cpufreq.c Merge branch 'pm-opp' 2019-03-04 11:19:14 +01:00
mvebu-cpufreq.c cpufreq: mvebu: Remove OPPs using dev_pm_opp_remove() 2018-09-19 14:56:44 -07:00
omap-cpufreq.c cpufreq: OMAP: Register an Energy Model 2019-02-07 10:07:36 +05:30
p4-clockmod.c cpufreq: p4-clockmod: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
pasemi-cpufreq.c cpufreq: Add and use cpufreq_for_each_{valid_,}entry_idx() 2018-02-08 10:21:39 +01:00
pcc-cpufreq.c cpufreq: pcc-cpufreq: remove unneeded semicolon 2019-02-18 10:27:38 +05:30
pmac32-cpufreq.c drivers/cpufreq: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
pmac64-cpufreq.c cpufreq: pmac64: add of_node_put() 2018-11-29 22:35:03 +01:00
powernow-k6.c cpufreq: powernow: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
powernow-k7.c cpufreq: powernow: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
powernow-k7.h
powernow-k8.c cpufreq: powernow: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
powernow-k8.h
powernv-cpufreq.c cpufreq: powernv: fix missing check of return value in init_powernv_pstates() 2019-02-18 10:27:38 +05:30
ppc_cbe_cpufreq_pervasive.c
ppc_cbe_cpufreq_pmi.c cpufreq: Remove CPUFREQ_START notifier event 2017-02-04 00:05:30 +01:00
ppc_cbe_cpufreq.c cpufreq: ppc_cbe: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
ppc_cbe_cpufreq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pxa2xx-cpufreq.c cpufreq: pxa2xx: remove incorrect __init annotation 2019-03-07 21:38:44 +01:00
pxa3xx-cpufreq.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
qcom-cpufreq-hw.c Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-cpufreq 2019-02-13 12:27:23 +01:00
qcom-cpufreq-kryo.c Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-cpufreq 2019-03-01 10:21:18 +01:00
qoriq-cpufreq.c cpufreq: qoriq: Use auto-registration of thermal cooling device 2019-01-30 23:06:08 +01:00
s3c24xx-cpufreq-debugfs.c cpufreq: s3c24xx: Change to use DEFINE_SHOW_ATTRIBUTE macro 2018-11-29 22:30:05 +01:00
s3c24xx-cpufreq.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
s3c64xx-cpufreq.c cpufreq: s3c64xx: remove incorrect __init annotation 2016-12-21 02:54:18 +01:00
s3c2410-cpufreq.c
s3c2412-cpufreq.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
s3c2416-cpufreq.c cpufreq: s3c2416: double free on driver init error path 2017-02-09 01:22:45 +01:00
s3c2440-cpufreq.c cpufreq: s3c2440: fix spelling mistake: "divsiors" -> "divisors" 2018-05-10 11:50:42 +02:00
s5pv210-cpufreq.c cpufreq: s5pv210: Defer probe if getting regulators fail 2019-02-07 10:01:51 +05:30
sa1100-cpufreq.c cpufreq: Add CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING cpufreq driver flag 2017-07-26 00:15:46 +02:00
sa1110-cpufreq.c cpufreq: Add CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING cpufreq driver flag 2017-07-26 00:15:46 +02:00
sc520_freq.c cpufreq: sc520: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
scmi-cpufreq.c Merge branch 'pm-opp' 2019-03-04 11:19:14 +01:00
scpi-cpufreq.c Merge branch 'pm-opp' 2019-03-04 11:19:14 +01:00
sfi-cpufreq.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
sh-cpufreq.c cpufreq: sh: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
sparc-us2e-cpufreq.c cpufreq: sparc: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
sparc-us3-cpufreq.c cpufreq: sparc: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
spear-cpufreq.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
speedstep-centrino.c cpufreq: speedstep: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
speedstep-ich.c cpufreq: speedstep: convert BUG() to BUG_ON() 2019-02-18 10:27:38 +05:30
speedstep-lib.c cpufreq: speedstep: fix speedstep_detect_processor()'s return type 2018-05-10 11:46:00 +02:00
speedstep-lib.h
speedstep-smi.c cpufreq: speedstep: Don't validate the frequency table twice 2018-03-20 12:07:52 +01:00
sti-cpufreq.c cpufreq: Convert to using %pOF instead of full_name 2017-08-25 01:20:46 +02:00
tango-cpufreq.c cpufreq: dt: Don't use generic platdev driver for tango 2017-07-22 02:20:59 +02:00
tegra20-cpufreq.c cpufreq: tegra20: Wrap cpufreq into platform driver 2018-05-21 13:44:24 +02:00
tegra124-cpufreq.c Power management updates for 5.1-rc1 2019-03-06 12:59:46 -08:00
tegra186-cpufreq.c cpufreq: tegra186: don't pass GFP_DMA32 to dma_alloc_coherent() 2018-10-17 09:25:38 +02:00
ti-cpufreq.c cpufreq: ti-cpufreq: Only register platform_device when supported 2018-11-19 11:26:06 +01:00
unicore2-cpufreq.c cpufreq: Add CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING cpufreq driver flag 2017-07-26 00:15:46 +02:00
vexpress-spc-cpufreq.c cpufreq: arm_big_little: make cpufreq_arm_bL_ops structures const 2017-11-08 23:22:20 +01:00