aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2018-11-22 07:34:41 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-13 09:20:26 +0100
commit52c872554bc5bab85221ebdcb37794f79a314d52 (patch)
treecf04ffb8f702e756fe182f252feb1886d429c215
parent1c0d7303b2a012ea6149fa99accdd9242276a94f (diff)
net: amd: add missing of_node_put()
[ Upstream commit c44c749d3b6fdfca39002e7e48e03fe9f9fe37a3 ] 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: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/amd/sunlance.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c
index 9b56b40259dc..3153465d4d02 100644
--- a/drivers/net/ethernet/amd/sunlance.c
+++ b/drivers/net/ethernet/amd/sunlance.c
@@ -1419,7 +1419,7 @@ static int sparc_lance_probe_one(struct platform_device *op,
prop = of_get_property(nd, "tpe-link-test?", NULL);
if (!prop)
- goto no_link_test;
+ goto node_put;
if (strcmp(prop, "true")) {
printk(KERN_NOTICE "SunLance: warning: overriding option "
@@ -1428,6 +1428,8 @@ static int sparc_lance_probe_one(struct platform_device *op,
"to ecd@skynet.be\n");
auxio_set_lte(AUXIO_LTE_ON);
}
+node_put:
+ of_node_put(nd);
no_link_test:
lp->auto_select = 1;
lp->tpe = 0;