Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b877fe288a325b9711d83628eb54e1deb63f962e
Commit:     b877fe288a325b9711d83628eb54e1deb63f962e
Parent:     f5e42fbab6c6ca39a33410a0ed0037589908c264
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 22 13:39:09 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Oct 23 20:18:13 2007 -0400

    sky2: crash on remove
    
    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 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 24cfb62..c27c7d6 100644
--- 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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to