projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5e42fb
)
sky2: crash on remove
author
Stephen Hemminger
<
[email protected]
>
Mon, 22 Oct 2007 20:39:09 +0000
(13:39 -0700)
committer
Jeff Garzik
<
[email protected]
>
Wed, 24 Oct 2007 00:18:13 +0000
(20:18 -0400)
Fix off-by one in remove logic that just got introduced.
Signed-off-by: Stephen Hemminger <
[email protected]
>
Signed-off-by: Jeff Garzik <
[email protected]
>
drivers/net/sky2.c
patch
|
blob
|
history
diff --git
a/drivers/net/sky2.c
b/drivers/net/sky2.c
index 24cfb6275d9b37a39cd021a45a00f1c7951fc886..c27c7d63b6a56abc88d7ebda8d14a02795ce81ea 100644
(file)
--- a/
drivers/net/sky2.c
+++ b/
drivers/net/sky2.c
@@
-4271,7
+4271,7
@@
static void __devexit sky2_remove(struct pci_dev *pdev)
del_timer_sync(&hw->watchdog_timer);
cancel_work_sync(&hw->restart_work);
- for (i = hw->ports; i >= 0; --i)
+ for (i = hw->ports
-1
; i >= 0; --i)
unregister_netdev(hw->dev[i]);
sky2_write32(hw, B0_IMSK, 0);
@@
-4289,7
+4289,7
@@
static void __devexit sky2_remove(struct pci_dev *pdev)
pci_release_regions(pdev);
pci_disable_device(pdev);
- for (i = hw->ports; i >= 0; --i)
+ for (i = hw->ports
-1
; i >= 0; --i)
free_netdev(hw->dev[i]);
iounmap(hw->regs);