aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArend Van Spriel <arend.vanspriel@broadcom.com>2017-07-26 08:09:24 -0400
committerKalle Valo <kvalo@codeaurora.org>2017-07-27 07:03:14 -0400
commit5f5d03143de5e0c593da4ab18fc6393c2815e108 (patch)
tree430661e601f33b5c438401090fb2e98fb92862f0
parent58f36b4526add4870476e1dc97a8467cf16aeee6 (diff)
brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice
Due to a bugfix in wireless tree and the commit mentioned below a merge was needed which went haywire. So the submitted change resulted in the function brcmf_sdiod_sgtable_alloc() being called twice during the probe thus leaking the memory of the first call. Cc: stable@vger.kernel.org # 4.6.x Fixes: 4d7928959832 ("brcmfmac: switch to new platform data") Reported-by: Stefan Wahren <stefan.wahren@i2se.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index c3ecec673eb7..f3556122c6ac 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -4175,11 +4175,6 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
4175 goto fail; 4175 goto fail;
4176 } 4176 }
4177 4177
4178 /* allocate scatter-gather table. sg support
4179 * will be disabled upon allocation failure.
4180 */
4181 brcmf_sdiod_sgtable_alloc(bus->sdiodev);
4182
4183 /* Query the F2 block size, set roundup accordingly */ 4178 /* Query the F2 block size, set roundup accordingly */
4184 bus->blocksize = bus->sdiodev->func[2]->cur_blksize; 4179 bus->blocksize = bus->sdiodev->func[2]->cur_blksize;
4185 bus->roundup = min(max_roundup, bus->blocksize); 4180 bus->roundup = min(max_roundup, bus->blocksize);