: Fixed erroneous introduction of for_each_netdev
Subsystems (3)
PATCH 1/1 : Fixed erroneous introduction of for_each_netdev
Signed-off-by Jon Paul Maloy <[email protected]>
--- net/tipc/eth_media.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
net/tipc/eth_media.c +6 -4
@@ -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 ;
Signature · 1 line
1.5.0.5
David Miller
maintainerFrom: Jon Paul Maloy <[email protected]>
Date: Tue, 15 May 2007 20:21:14 -0400
Quoted 2 lines
Signed-off-by Jon Paul Maloy <[email protected]>
Sorry about that Jon, I thought the new code was correct :-/
David Miller
maintainerFrom: Jon Paul Maloy <[email protected]>
Date: Tue, 15 May 2007 20:21:14 -0400
Quoted 2 lines
Signed-off-by Jon Paul Maloy <[email protected]>
Patch applied, thanks Jon.
I specifically had the developer of that change audit for this exact kind of bug, my apologies that this one case still slipped through :-/