summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/sbni.c
diff options
context:
space:
mode:
authorHannes Eder <hannes@hanneseder.net>2009-02-14 12:48:25 +0100
committerDavid S. Miller <davem@davemloft.net>2009-02-18 04:34:48 +0100
commit5ed1e981bd243d78f95738a355bd117cf1f6daa1 (patch)
tree9cadff7b3fab65970f4687ae871f0069878fd2b7 /drivers/net/wan/sbni.c
parentdrivers/net/wan: fix warning: format not a string literal and no ... (diff)
downloadlinux-5ed1e981bd243d78f95738a355bd117cf1f6daa1.tar.xz
linux-5ed1e981bd243d78f95738a355bd117cf1f6daa1.zip
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.c17
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 )
}
void
-cleanup_module( void )
+cleanup_module(void)
{
- struct net_device *dev;
- int num;
+ int i;
- for( num = 0; num < SBNI_MAX_NUM_CARDS; ++num )
- if( (dev = sbni_cards[ num ]) != NULL ) {
- unregister_netdev( dev );
- release_region( dev->base_addr, SBNI_IO_EXTENT );
- free_netdev( dev );
+ for (i = 0; i < SBNI_MAX_NUM_CARDS; ++i) {
+ struct net_device *dev = sbni_cards[i];
+ if (dev != NULL) {
+ unregister_netdev(dev);
+ release_region(dev->base_addr, SBNI_IO_EXTENT);
+ free_netdev(dev);
}
+ }
}
#else /* MODULE */