From 0500077d51fa37d22d52e7911e6d52bf5949f7ea Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Wed, 24 Apr 2024 12:14:17 +0800 Subject: [PATCH] cnss2: modify return value of API for resuming PCIe bus PCI bus resuming should be treated as fail once MHI resume fails, to avoid the following operations those depend on the result. Change-Id: If3d21abf95cc2816bf6c34cb950ff430eee022d3 CRs-Fixed: 3795957 --- cnss2/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cnss2/pci.c b/cnss2/pci.c index 2052da9c5e..7480cfc8e6 100644 --- a/cnss2/pci.c +++ b/cnss2/pci.c @@ -4057,7 +4057,8 @@ int cnss_pci_resume_bus(struct cnss_pci_data *pci_priv) pci_set_master(pci_dev); skip_enable_pci: - cnss_pci_set_mhi_state(pci_priv, CNSS_MHI_RESUME); + if (cnss_pci_set_mhi_state(pci_priv, CNSS_MHI_RESUME)) + ret = -EAGAIN; out: return ret; }