* [patch] brcm80211: fix error code in brcmf_pcie_exit_download_state()
@ 2015-11-27 13:43 Dan Carpenter
2015-11-30 12:59 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-11-27 13:43 UTC (permalink / raw)
To: Brett Rudley
Cc: Arend van Spriel, Franky (Zhenhui) Lin, Hante Meuleman,
Kalle Valo, Pieter-Paul Giesberts, linux-wireless,
brcm80211-dev-list, kernel-janitors
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 <dan.carpenter@oracle.com>
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index 83d8042..e149541 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -622,7 +622,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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-30 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27 13:43 [patch] brcm80211: fix error code in brcmf_pcie_exit_download_state() Dan Carpenter
2015-11-30 12:59 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).