Commit ccbffb5d authored by Yangtao Li's avatar Yangtao Li Committed by Greg Kroah-Hartman

net: amd: add missing of_node_put()

[ Upstream commit c44c749d ]

of_find_node_by_path() acquires a reference to the node
returned by it and that reference needs to be dropped by its caller.
This place doesn't do that, so fix it.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 63e307e8
...@@ -1418,7 +1418,7 @@ static int sparc_lance_probe_one(struct platform_device *op, ...@@ -1418,7 +1418,7 @@ static int sparc_lance_probe_one(struct platform_device *op,
prop = of_get_property(nd, "tpe-link-test?", NULL); prop = of_get_property(nd, "tpe-link-test?", NULL);
if (!prop) if (!prop)
goto no_link_test; goto node_put;
if (strcmp(prop, "true")) { if (strcmp(prop, "true")) {
printk(KERN_NOTICE "SunLance: warning: overriding option " printk(KERN_NOTICE "SunLance: warning: overriding option "
...@@ -1427,6 +1427,8 @@ static int sparc_lance_probe_one(struct platform_device *op, ...@@ -1427,6 +1427,8 @@ static int sparc_lance_probe_one(struct platform_device *op,
"to ecd@skynet.be\n"); "to ecd@skynet.be\n");
auxio_set_lte(AUXIO_LTE_ON); auxio_set_lte(AUXIO_LTE_ON);
} }
node_put:
of_node_put(nd);
no_link_test: no_link_test:
lp->auto_select = 1; lp->auto_select = 1;
lp->tpe = 0; lp->tpe = 0;
......
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