Commit 5ed1e981 authored by Hannes Eder's avatar Hannes Eder Committed by David S. Miller

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: default avatarHannes Eder <hannes@hanneseder.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5ee0d593
...@@ -1520,16 +1520,17 @@ int __init init_module( void ) ...@@ -1520,16 +1520,17 @@ int __init init_module( void )
} }
void void
cleanup_module( void ) cleanup_module(void)
{ {
struct net_device *dev; int i;
int num;
for( num = 0; num < SBNI_MAX_NUM_CARDS; ++num ) for (i = 0; i < SBNI_MAX_NUM_CARDS; ++i) {
if( (dev = sbni_cards[ num ]) != NULL ) { struct net_device *dev = sbni_cards[i];
unregister_netdev( dev ); if (dev != NULL) {
release_region( dev->base_addr, SBNI_IO_EXTENT ); unregister_netdev(dev);
free_netdev( dev ); release_region(dev->base_addr, SBNI_IO_EXTENT);
free_netdev(dev);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment