diff mbox

Correctly fail to suspend when SDIO does not support power on suspend

Message ID B63CA48C-C400-4657-834E-23467705FEE3@lairdtech.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Eric Bentley Aug. 31, 2017, 11:37 p.m. UTC
Return error when failing to set power management capabilities flag.  This will cause the suspend to fail but the radio
will continue to operate.  Allowing this to fail without reporting error will cause the radio to be non-functional on 
resume as it will have lost power.

Signed-off-by: Eric Bentley <eric.bentley@lairdtech.com>


---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.6.0.GIT
diff mbox

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
index 72139b5..2f7d03f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
@@ -1264,8 +1264,10 @@  static int brcmf_ops_sdio_suspend(struct device *dev)
 		else
 			sdio_flags |= MMC_PM_WAKE_SDIO_IRQ;
 	}
-	if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags))
+	if (sdio_set_host_pm_flags(sdiodev->func[1], sdio_flags)) (
 		brcmf_err("Failed to set pm_flags %x\n", sdio_flags);
+		return -EINVAL;
+	}
 	return 0;
 }