Commit 3bd53ea0 authored by Liang He's avatar Liang He Committed by Felix Fietkau

mediatek: mt76: eeprom: fix missing of_node_put() in mt76_find_power_limits_node()

We should use of_node_put() for the reference 'np' returned by
of_get_child_by_name() which will increase the refcount.

Fixes: 22b980ba ("mt76: add functions for parsing rate power limits from DT")
Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 0a14c1d0
...@@ -162,10 +162,13 @@ mt76_find_power_limits_node(struct mt76_dev *dev) ...@@ -162,10 +162,13 @@ mt76_find_power_limits_node(struct mt76_dev *dev)
} }
if (mt76_string_prop_find(country, dev->alpha2) || if (mt76_string_prop_find(country, dev->alpha2) ||
mt76_string_prop_find(regd, region_name)) mt76_string_prop_find(regd, region_name)) {
of_node_put(np);
return cur; return cur;
}
} }
of_node_put(np);
return fallback; return fallback;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment