Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2016-04-18 15:51:44 +0200
committerMatthias Brugger <mbrugger@suse.com>2016-04-18 15:51:44 +0200
commitcf102ead9718326c3f1a945333f29da36ad76140 (patch)
tree9e9ff548d80da546f069557fc9d186667b54b165
parent8707e77794608fe4dc72120b2621aecc509c974e (diff)
net: thunderx: Fix broken of_node_put() code (bsc#975970).rpm-4.4.7-34
-rw-r--r--drivers/net/ethernet/cavium/thunder/thunder_bgx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
index cb2dc9ce02e1..64b98f1b8c19 100644
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
@@ -1011,10 +1011,11 @@ static int bgx_init_of_phy(struct bgx *bgx)
}
lmac++;
- if (lmac == MAX_LMAC_PER_BGX)
+ if (lmac == MAX_LMAC_PER_BGX) {
+ of_node_put(node);
break;
+ }
}
- of_node_put(node);
return 0;
defer: