4.9-stable review patch.  If anyone has any objections, please let me know.


From: Arend Van Spriel <arend.vanspr...@broadcom.com>

commit 5f5d03143de5e0c593da4ab18fc6393c2815e108 upstream.

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.

Fixes: 4d7928959832 ("brcmfmac: switch to new platform data")
Reported-by: Stefan Wahren <stefan.wah...@i2se.com>
Tested-by: Stefan Wahren <stefan.wah...@i2se.com>
Reviewed-by: Hante Meuleman <hante.meule...@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspr...@broadcom.com>
Signed-off-by: Kalle Valo <kv...@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c |    5 -----
 1 file changed, 5 deletions(-)

--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -4161,11 +4161,6 @@ struct brcmf_sdio *brcmf_sdio_probe(stru
                goto fail;
-       /* allocate scatter-gather table. sg support
-        * will be disabled upon allocation failure.
-        */
-       brcmf_sdiod_sgtable_alloc(bus->sdiodev);
        /* Query the F2 block size, set roundup accordingly */
        bus->blocksize = bus->sdiodev->func[2]->cur_blksize;
        bus->roundup = min(max_roundup, bus->blocksize);

Reply via email to