From ac9fb6837baf89f86808767a650c5bc8bc4411d3 Mon Sep 17 00:00:00 2001 From: gaolez Date: Tue, 11 Jul 2023 13:01:19 +0800 Subject: [PATCH] cnss2: Refine the pci power setting log In current implementation, the error log not record the return value of setting pci power function, with this return value we can know the reason of why setting pci power failed. Change-Id: Icf1fdba16faf539334704ca1f8ce24fecd49aa94 --- cnss2/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cnss2/pci.c b/cnss2/pci.c index 7d7390b7b6..ce7af12d12 100644 --- a/cnss2/pci.c +++ b/cnss2/pci.c @@ -1424,7 +1424,8 @@ int cnss_suspend_pci_link(struct cnss_pci_data *pci_priv) pci_disable_device(pci_priv->pci_dev); if (pci_priv->pci_dev->device != QCA6174_DEVICE_ID) { - if (pci_set_power_state(pci_priv->pci_dev, PCI_D3hot)) + ret = pci_set_power_state(pci_priv->pci_dev, PCI_D3hot); + if (ret) cnss_pr_err("Failed to set D3Hot, err = %d\n", ret); }