351-0042-brcmfmac-initialize-variable-in-brcmf_sdiod_regrl.patch 1.1 KB

12345678910111213141516171819202122232425262728
  1. From 26305d3d7298d1ddf8fd4ce95a382aa90534f0a3 Mon Sep 17 00:00:00 2001
  2. From: Arend Van Spriel <arend.vanspriel@broadcom.com>
  3. Date: Mon, 19 Sep 2016 12:09:54 +0100
  4. Subject: [PATCH] brcmfmac: initialize variable in brcmf_sdiod_regrl()
  5. In case of an error the variable returned is uninitialized. The caller
  6. will probably check the error code before using it, but better assure
  7. it is set to zero.
  8. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
  9. Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
  10. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
  11. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  12. ---
  13. drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 +-
  14. 1 file changed, 1 insertion(+), 1 deletion(-)
  15. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
  16. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
  17. @@ -416,7 +416,7 @@ u8 brcmf_sdiod_regrb(struct brcmf_sdio_d
  18. u32 brcmf_sdiod_regrl(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret)
  19. {
  20. - u32 data;
  21. + u32 data = 0;
  22. int retval;
  23. brcmf_dbg(SDIO, "addr:0x%08x\n", addr);