projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fee34dd
)
net: dsa: mt7530: add missing of_node_put() in mt7530_setup()
author
Yang Yingliang
<yangyingliang@huawei.com>
Thu, 28 Apr 2022 09:53:17 +0000
(17:53 +0800)
committer
Jakub Kicinski
<kuba@kernel.org>
Sat, 30 Apr 2022 02:23:55 +0000
(19:23 -0700)
Add of_node_put() if of_get_phy_mode() fails in mt7530_setup()
Fixes:
0c65b2b90d13
("net: of_get_phy_mode: Change API to solve int/unit warnings")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link:
https://lore.kernel.org/r/20220428095317.538829-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mt7530.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/dsa/mt7530.c
b/drivers/net/dsa/mt7530.c
index 19f0035d4410ff109021680cc32d44af25d2aad3..fe3cb26f4287ee039ba66f1054d41df7790b742a 100644
(file)
--- a/
drivers/net/dsa/mt7530.c
+++ b/
drivers/net/dsa/mt7530.c
@@
-2229,6
+2229,7
@@
mt7530_setup(struct dsa_switch *ds)
ret = of_get_phy_mode(mac_np, &interface);
if (ret && ret != -ENODEV) {
of_node_put(mac_np);
+ of_node_put(phy_node);
return ret;
}
id = of_mdio_parse_addr(ds->dev, phy_node);