diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2018-11-22 07:34:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-23 20:24:24 -0500 |
commit | c44c749d3b6fdfca39002e7e48e03fe9f9fe37a3 (patch) | |
tree | 8b1eeb5a4a237d74747834d76df2ad80ceb74a89 | |
parent | 5ed9dc99107144f83b6c1bb52a69b58875baf540 (diff) |
net: amd: add missing of_node_put()
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>
-rw-r--r-- | drivers/net/ethernet/amd/sunlance.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c index b4fc0ed5bce8..9d4899826823 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, | |||
1419 | 1419 | ||
1420 | prop = of_get_property(nd, "tpe-link-test?", NULL); | 1420 | prop = of_get_property(nd, "tpe-link-test?", NULL); |
1421 | if (!prop) | 1421 | if (!prop) |
1422 | goto no_link_test; | 1422 | goto node_put; |
1423 | 1423 | ||
1424 | if (strcmp(prop, "true")) { | 1424 | if (strcmp(prop, "true")) { |
1425 | printk(KERN_NOTICE "SunLance: warning: overriding option " | 1425 | printk(KERN_NOTICE "SunLance: warning: overriding option " |
@@ -1428,6 +1428,8 @@ static int sparc_lance_probe_one(struct platform_device *op, | |||
1428 | "to ecd@skynet.be\n"); | 1428 | "to ecd@skynet.be\n"); |
1429 | auxio_set_lte(AUXIO_LTE_ON); | 1429 | auxio_set_lte(AUXIO_LTE_ON); |
1430 | } | 1430 | } |
1431 | node_put: | ||
1432 | of_node_put(nd); | ||
1431 | no_link_test: | 1433 | no_link_test: |
1432 | lp->auto_select = 1; | 1434 | lp->auto_select = 1; |
1433 | lp->tpe = 0; | 1435 | lp->tpe = 0; |