1 From e94fb562680c41101a9caf7afc0cd40065e1b5ed Mon Sep 17 00:00:00 2001
2 From: Yangtao Li <tiny.windzz@gmail.com>
3 Date: Thu, 22 Nov 2018 07:34:41 -0500
4 Subject: net: amd: add missing of_node_put()
6 [ Upstream commit c44c749d3b6fdfca39002e7e48e03fe9f9fe37a3 ]
8 of_find_node_by_path() acquires a reference to the node
9 returned by it and that reference needs to be dropped by its caller.
10 This place doesn't do that, so fix it.
12 Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
13 Signed-off-by: David S. Miller <davem@davemloft.net>
14 Signed-off-by: Sasha Levin <sashal@kernel.org>
16 drivers/net/ethernet/amd/sunlance.c | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
19 diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c
20 index 291ca5187f12..9845e07d40cd 100644
21 --- a/drivers/net/ethernet/amd/sunlance.c
22 +++ b/drivers/net/ethernet/amd/sunlance.c
23 @@ -1418,7 +1418,7 @@ static int sparc_lance_probe_one(struct platform_device *op,
25 prop = of_get_property(nd, "tpe-link-test?", NULL);
30 if (strcmp(prop, "true")) {
31 printk(KERN_NOTICE "SunLance: warning: overriding option "
32 @@ -1427,6 +1427,8 @@ static int sparc_lance_probe_one(struct platform_device *op,
33 "to ecd@skynet.be\n");
34 auxio_set_lte(AUXIO_LTE_ON);