From 7941c2129a4bc189e17e3188a7d315d946caa1d6 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 27 Nov 2015 16:43:27 +0300 Subject: [PATCH] brcm80211: fix error code in brcmf_pcie_exit_download_state() The original code returns 1 on failure and 0 on success but the caller was expecting an error code on failure. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index ace0404817dc..b5a4247604f3 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -609,7 +609,9 @@ static int brcmf_pcie_exit_download_state(struct brcmf_pciedev_info *devinfo, brcmf_chip_resetcore(core, 0, 0, 0); } - return !brcmf_chip_set_active(devinfo->ci, resetintr); + if (!brcmf_chip_set_active(devinfo->ci, resetintr)) + return -EINVAL; + return 0; } -- 2.30.2