summaryrefslogtreecommitdiff
path: root/sound/soc/intel/skylake/skl-topology.c
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2016-01-21 14:57:59 +0300
committerMark Brown <broonie@kernel.org>2016-01-22 19:42:03 +0300
commitc14a82c781f8df50c4c5215ab92affdc60d72c01 (patch)
tree8b6d1d3773e1bfac45187539d668a8e2168cb1d7 /sound/soc/intel/skylake/skl-topology.c
parent822ad70a2f5c420da5baa9f4354e6b7813ca6da9 (diff)
downloadlinux-c14a82c781f8df50c4c5215ab92affdc60d72c01.tar.xz
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: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake/skl-topology.c')
-rw-r--r--sound/soc/intel/skylake/skl-topology.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 5315b7422b98..c7816d52ad08 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -1511,6 +1511,7 @@ int skl_tplg_init(struct snd_soc_platform *platform, struct hdac_ext_bus *ebus)
release_firmware(fw);
if (ret < 0) {
dev_err(bus->dev, "tplg component load failed%d\n", ret);
+ release_firmware(fw);
return -EINVAL;
}