mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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: 22b980badc0f ("mt76: add functions for parsing rate power limits from DT")
Signed-off-by: Liang He <[email protected]>
This commit is contained in:
@@ -163,10 +163,13 @@ mt76_find_power_limits_node(struct mt76_dev *dev)
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
of_node_put(np);
|
||||
return fallback;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user