提交 5e90f0f3 编写于 作者: H Hector Martin 提交者: Kalle Valo

brcmfmac: pcie: Release firmwares in the brcmf_pcie_setup error path

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

Fixes: 82f93cf4 ("brcmfmac: get chip's default RAM info during PCIe setup")
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: NArend van Spriel <arend.vanspriel@broadcom.com>
Cc: stable@vger.kernel.org
Signed-off-by: NHector Martin <marcan@marcan.st>
Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: NKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220131160713.245637-2-marcan@marcan.st
上级 e80affde
......@@ -1777,6 +1777,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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册