Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c40eb8cc authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Honor the return value of MHI driver suspend



If MHI driver suspend fails, CNSS driver should return failure for the
suspend.

Change-Id: Ifd111f1caa261c877061b5c3c96bb8264936251d
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent 8d0bafc0
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -374,9 +374,15 @@ static int cnss_pci_suspend(struct device *dev)
	if (driver_ops && driver_ops->suspend) {
		ret = driver_ops->suspend(pci_dev, state);
		if (pci_priv->pci_link_state) {
			if (cnss_pci_set_mhi_state(pci_priv,
						   CNSS_MHI_SUSPEND)) {
				driver_ops->resume(pci_dev);
				ret = -EAGAIN;
				goto out;
			}

			cnss_set_pci_config_space(pci_priv,
						  SAVE_PCI_CONFIG_SPACE);
			cnss_pci_set_mhi_state(pci_priv, CNSS_MHI_SUSPEND);
		}
	}