ASoC: dapm: fix memory leak
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 10 Sep 2015 12:31:44 +0000 (18:01 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 11 Sep 2015 11:15:52 +0000 (12:15 +0100)
Incase of an unknown event we were directly returning but we missed
freeing params.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c

index f4bf21a5539b0e0592cc6e622f7714730c22f0ef..ff8bda471b2531fede57ea0dd225bc4081d5ba16 100644 (file)
@@ -3501,7 +3501,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
 
        default:
                WARN(1, "Unknown event %d\n", event);
-               return -EINVAL;
+               ret = -EINVAL;
        }
 
 out: