Skip to content

Commit

Permalink
sata_nv: propagate ata_pci_device_do_resume return value
Browse files Browse the repository at this point in the history
ata_pci_device_do_resume can fail if the PCI device couldn't be re-enabled.
 Update sata_nv to propagate the return value from this call and to not try
to do any other resume activities if it fails.  Fixes a compile warning.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Robert Hancock authored and Jeff Garzik committed Feb 9, 2007
1 parent a2cfe81 commit ce053fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/ata/sata_nv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,8 +1575,11 @@ static int nv_pci_device_resume(struct pci_dev *pdev)
{
struct ata_host *host = dev_get_drvdata(&pdev->dev);
struct nv_host_priv *hpriv = host->private_data;
int rc;

ata_pci_device_do_resume(pdev);
rc = ata_pci_device_do_resume(pdev);
if(rc)
return rc;

if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) {
if(hpriv->type >= CK804) {
Expand Down

0 comments on commit ce053fa

Please sign in to comment.