Skip to content

Commit

Permalink
[TIPC]: Fixed erroneous introduction of for_each_netdev
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Paul Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jon Paul Maloy authored and David S. Miller committed May 24, 2007
1 parent b8f5583 commit cb283ea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions net/tipc/eth_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,20 @@ static int recv_msg(struct sk_buff *buf, struct net_device *dev,

static int enable_bearer(struct tipc_bearer *tb_ptr)
{
struct net_device *dev, *pdev;
struct net_device *dev = NULL;
struct net_device *pdev = NULL;
struct eth_bearer *eb_ptr = &eth_bearers[0];
struct eth_bearer *stop = &eth_bearers[MAX_ETH_BEARERS];
char *driver_name = strchr((const char *)tb_ptr->name, ':') + 1;

/* Find device with specified name */
dev = NULL;
for_each_netdev(pdev)
if (!strncmp(dev->name, driver_name, IFNAMSIZ)) {

for_each_netdev(pdev){
if (!strncmp(pdev->name, driver_name, IFNAMSIZ)) {
dev = pdev;
break;
}
}
if (!dev)
return -ENODEV;

Expand Down

0 comments on commit cb283ea

Please sign in to comment.