Message ID | 84e202eb-40f3-4132-b2d3-67069a2bba70@web.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | cpufreq: mvebu: Call of_node_put(np) only once in armada_xp_pmsu_cpufreq_init() | expand |
diff --git a/drivers/cpufreq/mvebu-cpufreq.c b/drivers/cpufreq/mvebu-cpufreq.c index 7f3cfe668f30..55ba7ad72c36 100644 --- a/drivers/cpufreq/mvebu-cpufreq.c +++ b/drivers/cpufreq/mvebu-cpufreq.c @@ -42,14 +42,12 @@ static int __init armada_xp_pmsu_cpufreq_init(void) return 0; ret = of_address_to_resource(np, 1, &res); + of_node_put(np); if (ret) { pr_warn(FW_WARN "not enabling cpufreq, deprecated armada-xp-cpu-clock binding\n"); - of_node_put(np); return 0; } - of_node_put(np); - /* * For each CPU, this loop registers the operating points * supported (which are the nominal CPU frequency and half of