Skip to content

Commit

Permalink
drivers/net/wan: fix sparse warning: symbol shadows an earlier one
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hannes Eder authored and David S. Miller committed Feb 18, 2009
1 parent 5ee0d59 commit 5ed1e98
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions drivers/net/wan/sbni.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 5ed1e98

Please sign in to comment.