Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d628d5c5 authored by Wang Yufen's avatar Wang Yufen Committed by Greg Kroah-Hartman
Browse files

wifi: brcmfmac: Fix error return code in brcmf_sdio_download_firmware()



[ Upstream commit c2f2924bc7f9ea75ef8d95863e710168f8196256 ]

Fix to return a negative error code instead of 0 when
brcmf_chip_set_active() fails. In addition, change the return
value for brcmf_pcie_exit_download_state() to keep consistent.

Fixes: d380ebc9 ("brcmfmac: rename chip download functions")
Signed-off-by: default avatarWang Yufen <wangyufen@huawei.com>
Reviewed-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/1669959342-27144-1-git-send-email-wangyufen@huawei.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1a49bba5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -616,7 +616,7 @@ static int brcmf_pcie_exit_download_state(struct brcmf_pciedev_info *devinfo,
	}

	if (!brcmf_chip_set_active(devinfo->ci, resetintr))
		return -EINVAL;
		return -EIO;
	return 0;
}

+1 −0
Original line number Diff line number Diff line
@@ -3367,6 +3367,7 @@ static int brcmf_sdio_download_firmware(struct brcmf_sdio *bus,
	/* Take arm out of reset */
	if (!brcmf_chip_set_active(bus->ci, rstvec)) {
		brcmf_err("error getting out of ARM core reset\n");
		bcmerror = -EIO;
		goto err;
	}