diff options
author | David S. Miller <davem@davemloft.net> | 2015-11-01 00:15:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-01 00:15:30 -0400 |
commit | b75ec3af27bf011a760e2f44eb25a99b6fbb0fb3 (patch) | |
tree | 89f4fbab2c6194b32a46eb771c4b158585bf0bb5 /drivers/net/ethernet/ti | |
parent | e7b63ff115f21ea6c609cbb08f3d489af627af6e (diff) | |
parent | 523e13455ec9ec4457a5a1d24ff7132949742b70 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/netcp_ethss.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c index 6bff8d82ceab..4e70e7586a09 100644 --- a/drivers/net/ethernet/ti/netcp_ethss.c +++ b/drivers/net/ethernet/ti/netcp_ethss.c @@ -2637,8 +2637,10 @@ static void init_secondary_ports(struct gbe_priv *gbe_dev, mac_phy_link = true; slave->open = true; - if (gbe_dev->num_slaves >= gbe_dev->max_num_slaves) + if (gbe_dev->num_slaves >= gbe_dev->max_num_slaves) { + of_node_put(port); break; + } } /* of_phy_connect() is needed only for MAC-PHY interface */ @@ -3137,8 +3139,10 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev, continue; } gbe_dev->num_slaves++; - if (gbe_dev->num_slaves >= gbe_dev->max_num_slaves) + if (gbe_dev->num_slaves >= gbe_dev->max_num_slaves) { + of_node_put(interface); break; + } } of_node_put(interfaces); |