brcmfmac: pcie: Release firmwares in the brcmf_pcie_setup error path
authorHector Martin <marcan@marcan.st>
Mon, 31 Jan 2022 16:07:05 +0000 (01:07 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:39:58 +0000 (14:39 +0200)
commitf3820ddaf4f3ac80c7401ccc6a42e663c9317f31
tree00fe9427adc3e93edbd5b14dc987c491cecdb308
parentdaa07f29027c85f344f31c143d9c22ef299a31ff
brcmfmac: pcie: Release firmwares in the brcmf_pcie_setup error path

commit 5e90f0f3ead014867dade7a22f93958119f5efab upstream.

This avoids leaking memory if brcmf_chip_get_raminfo fails. Note that
the CLM blob is released in the device remove path.

Fixes: 82f93cf46d60 ("brcmfmac: get chip's default RAM info during PCIe setup")
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220131160713.245637-2-marcan@marcan.st
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c