diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/of/base.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 5e7c11ca1007..209953c4f6c6 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -2088,12 +2088,13 @@ int of_find_last_cache_level(unsigned int cpu) struct device_node *prev = NULL, *np = of_cpu_device_node_get(cpu); while (np) { + of_node_put(prev); prev = np; - of_node_put(np); np = of_find_next_cache_node(np); } of_property_read_u32(prev, "cache-level", &cache_level); + of_node_put(prev); return cache_level; } |