Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b364fd5081b02fa8a966a29eea2da628913fd4b8
Commit:     b364fd5081b02fa8a966a29eea2da628913fd4b8
Parent:     a1f9ce056a1875b6c8633f370df4fb169b925b16
Author:     Horms <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 19 15:06:44 2007 +0900
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Tue Mar 20 11:30:31 2007 -0500

    [SCSI] fusion: honour return value of pci_enable_device() in mpt_resume()
    
    Honour the return value of pci_enable_device(), which
    seems to be a desirable thing to do:
    
      2.6.20-rc4
      gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
    
        CC [M]  drivers/message/fusion/mptbase.o
        drivers/message/fusion/mptbase.c: In function `mpt_resume':
        drivers/message/fusion/mptbase.c:1541: warning: ignoring return value
        of `pci_enable_device', declared with attribute warn_unused_result
    
    It also in turn has mptscsih_resume() honour the return value of
    mpt_resume()
    
    I'm not sure about the handling of the other potential error cases
    in mpt_resume(), of which there appear to be many. But this does
    seem to be a good start.
    
    Signed-off-by: Simon Horman <[EMAIL PROTECTED]>
    Acked-by: "Moore, Eric" <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/message/fusion/mptbase.c  |    5 ++++-
 drivers/message/fusion/mptscsih.c |    3 +--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 0a2d7db..97471af 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1531,6 +1531,7 @@ mpt_resume(struct pci_dev *pdev)
        MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
        u32 device_state = pdev->current_state;
        int recovery_state;
+       int err;
 
        printk(MYIOC_s_INFO_FMT
        "pci-resume: pdev=0x%p, slot=%s, Previous operating state [D%d]\n",
@@ -1538,7 +1539,9 @@ mpt_resume(struct pci_dev *pdev)
 
        pci_set_power_state(pdev, 0);
        pci_restore_state(pdev);
-       pci_enable_device(pdev);
+       err = pci_enable_device(pdev);
+       if (err)
+               return err;
 
        /* enable interrupts */
        CHIPREG_WRITE32(&ioc->chip->IntMask, MPI_HIM_DIM);
diff --git a/drivers/message/fusion/mptscsih.c 
b/drivers/message/fusion/mptscsih.c
index 10927e3..537fcc2 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -1188,8 +1188,7 @@ mptscsih_suspend(struct pci_dev *pdev, pm_message_t state)
 int
 mptscsih_resume(struct pci_dev *pdev)
 {
-       mpt_resume(pdev);
-       return 0;
+       return mpt_resume(pdev);
 }
 
 #endif
-
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