Skip to content

Commit ce053fa

Browse files
Robert HancockJeff Garzik
authored andcommitted
sata_nv: propagate ata_pci_device_do_resume return value
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
1 parent a2cfe81 commit ce053fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/ata/sata_nv.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,8 +1575,11 @@ static int nv_pci_device_resume(struct pci_dev *pdev)
15751575
{
15761576
struct ata_host *host = dev_get_drvdata(&pdev->dev);
15771577
struct nv_host_priv *hpriv = host->private_data;
1578+
int rc;
15781579

1579-
ata_pci_device_do_resume(pdev);
1580+
rc = ata_pci_device_do_resume(pdev);
1581+
if(rc)
1582+
return rc;
15801583

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

0 commit comments

Comments
 (0)