Skip to contentSkip to conversation

sata_nv: propagate ata_pci_device_do_resume return value

PATCH New Robert Hancock 1 participant 1 message Feb 5, 2007 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

drivers/ata/sata_nv.c renamed from drivers/ata/sata_nv.c.beforeresumechange +0 -0
@@ -1604,8 +1604,11 @@ static int nv_pci_device_resume(struct p
{
	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) {