diff options
author | Hannes Eder <hannes@hanneseder.net> | 2009-02-14 06:48:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-17 22:34:48 -0500 |
commit | 5ed1e981bd243d78f95738a355bd117cf1f6daa1 (patch) | |
tree | 9cadff7b3fab65970f4687ae871f0069878fd2b7 /drivers/net/wan/sbni.c | |
parent | 5ee0d59335c551b7d3642f071bb4f3a30c287f59 (diff) |
drivers/net/wan: fix sparse warning: symbol shadows an earlier one
Impact: Rename function scope variable and while being at it fix some
coding style issues.
Fix this sparse warning:
drivers/net/wan/sbni.c:1526:14: warning: symbol 'num' shadows an earlier one
drivers/net/wan/sbni.c:160:13: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/sbni.c')
-rw-r--r-- | drivers/net/wan/sbni.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index 0aa28e1d4366..78f7bc92cbe8 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -1520,17 +1520,18 @@ int __init init_module( void ) | |||
1520 | } | 1520 | } |
1521 | 1521 | ||
1522 | void | 1522 | void |
1523 | cleanup_module( void ) | 1523 | cleanup_module(void) |
1524 | { | 1524 | { |
1525 | struct net_device *dev; | 1525 | int i; |
1526 | int num; | ||
1527 | 1526 | ||
1528 | for( num = 0; num < SBNI_MAX_NUM_CARDS; ++num ) | 1527 | for (i = 0; i < SBNI_MAX_NUM_CARDS; ++i) { |
1529 | if( (dev = sbni_cards[ num ]) != NULL ) { | 1528 | struct net_device *dev = sbni_cards[i]; |
1530 | unregister_netdev( dev ); | 1529 | if (dev != NULL) { |
1531 | release_region( dev->base_addr, SBNI_IO_EXTENT ); | 1530 | unregister_netdev(dev); |
1532 | free_netdev( dev ); | 1531 | release_region(dev->base_addr, SBNI_IO_EXTENT); |
1532 | free_netdev(dev); | ||
1533 | } | 1533 | } |
1534 | } | ||
1534 | } | 1535 | } |
1535 | 1536 | ||
1536 | #else /* MODULE */ | 1537 | #else /* MODULE */ |