mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-20 21:04:40 +08:00
[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>
This commit is contained in:
parent
b8f5583135
commit
cb283ead71
@ -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)
|
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 *eb_ptr = ð_bearers[0];
|
||||||
struct eth_bearer *stop = ð_bearers[MAX_ETH_BEARERS];
|
struct eth_bearer *stop = ð_bearers[MAX_ETH_BEARERS];
|
||||||
char *driver_name = strchr((const char *)tb_ptr->name, ':') + 1;
|
char *driver_name = strchr((const char *)tb_ptr->name, ':') + 1;
|
||||||
|
|
||||||
/* Find device with specified name */
|
/* Find device with specified name */
|
||||||
dev = NULL;
|
|
||||||
for_each_netdev(pdev)
|
for_each_netdev(pdev){
|
||||||
if (!strncmp(dev->name, driver_name, IFNAMSIZ)) {
|
if (!strncmp(pdev->name, driver_name, IFNAMSIZ)) {
|
||||||
dev = pdev;
|
dev = pdev;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user