mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
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: 82f93cf46d ("brcmfmac: get chip's default RAM info during PCIe setup")
Reviewed-by: Linus Walleij <[email protected]>
Reviewed-by: Arend van Spriel <[email protected]>
Cc: [email protected]
Signed-off-by: Hector Martin <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
2c894b12b2
commit
d0ab87f8dc
1 changed files with 2 additions and 0 deletions
|
|
@ -1775,6 +1775,8 @@ static void brcmf_pcie_setup(struct device *dev, int ret,
|
|||
ret = brcmf_chip_get_raminfo(devinfo->ci);
|
||||
if (ret) {
|
||||
brcmf_err(bus, "Failed to get RAM info\n");
|
||||
release_firmware(fw);
|
||||
brcmf_fw_nvram_free(nvram);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue