ASoC: Intel: Skylake: Fix memory leak
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 21 Jan 2016 11:57:59 +0000 (17:27 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 22 Jan 2016 16:42:03 +0000 (16:42 +0000)
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>
sound/soc/intel/skylake/skl-topology.c

index 5315b7422b98bc2c984dab9f5ce823c24bb02ac3..c7816d52ad0852205623c646b273d99a6832b15f 100644 (file)
@@ -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;
        }