Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c14a82c7 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Mark Brown
Browse files

ASoC: Intel: Skylake: Fix memory leak



If snd_soc_tplg_component_load() fails we just printed an error message
and returned the error code but we missed releasing the firmware.

Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 822ad70a
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1511,6 +1511,7 @@ int skl_tplg_init(struct snd_soc_platform *platform, struct hdac_ext_bus *ebus)
	release_firmware(fw);
	release_firmware(fw);
	if (ret < 0) {
	if (ret < 0) {
		dev_err(bus->dev, "tplg component load failed%d\n", ret);
		dev_err(bus->dev, "tplg component load failed%d\n", ret);
		release_firmware(fw);
		return -EINVAL;
		return -EINVAL;
	}
	}