Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e3b7df17c8344fbcc00e871e03f5f88d58905277
Commit:     e3b7df17c8344fbcc00e871e03f5f88d58905277
Parent:     549a68c3fe2ca320b0764d1289d17af797daa5d1
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Fri May 11 11:21:45 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri May 11 17:53:36 2007 -0400

    skge: crash on shutdown/suspend
    
    If device is not fails during module startup (like unsupported chip
    version) then driver would crash dereferencing a null pointer, on shutdown
    or suspend/resume.
    
    Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/skge.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index e048957..7766929 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3802,6 +3802,9 @@ static int skge_suspend(struct pci_dev *pdev, 
pm_message_t state)
        struct skge_hw *hw  = pci_get_drvdata(pdev);
        int i, err, wol = 0;
 
+       if (!hw)
+               return 0;
+
        err = pci_save_state(pdev);
        if (err)
                return err;
@@ -3830,6 +3833,9 @@ static int skge_resume(struct pci_dev *pdev)
        struct skge_hw *hw  = pci_get_drvdata(pdev);
        int i, err;
 
+       if (!hw)
+               return 0;
+
        err = pci_set_power_state(pdev, PCI_D0);
        if (err)
                goto out;
@@ -3868,6 +3874,9 @@ static void skge_shutdown(struct pci_dev *pdev)
        struct skge_hw *hw  = pci_get_drvdata(pdev);
        int i, wol = 0;
 
+       if (!hw)
+               return;
+
        for (i = 0; i < hw->ports; i++) {
                struct net_device *dev = hw->dev[i];
                struct skge_port *skge = netdev_priv(dev);
-
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