diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2007-05-23 15:11:15 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-24 16:36:54 -0700 |
commit | cb283ead710c342d9856af8507e2a42bf5c6576c (patch) | |
tree | 9e672c77e9ad4d3c600c5921076d5ecd58860ea5 /net/tipc | |
parent | b8f558313506b5bc435f2e031f3bec4b1725098e (diff) | |
download | linux-3.10-cb283ead710c342d9856af8507e2a42bf5c6576c.tar.gz linux-3.10-cb283ead710c342d9856af8507e2a42bf5c6576c.tar.bz2 linux-3.10-cb283ead710c342d9856af8507e2a42bf5c6576c.zip |
[TIPC]: Fixed erroneous introduction of for_each_netdev
Signed-off-by: Jon Paul Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/eth_media.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 0ee6ded18f3..77d2d9ce896 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c @@ -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 = ð_bearers[0]; struct eth_bearer *stop = ð_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; |