From: Dan Carpenter Date: Fri, 27 Nov 2015 13:43:27 +0000 (+0300) Subject: brcm80211: fix error code in brcmf_pcie_exit_download_state() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7941c2129a4bc189e17e3188a7d315d946caa1d6;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- 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; }