ASoC: dapm: fix error path in snd_soc_dapm_new_pcm

w_param_text[count] is freed in the wrong error path.
Fix it by shifting the outfree_w_param label.

Signed-off-by: anish kumar <yesanishhere@gmail.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
anish kumar 2017-09-20 01:28:33 -07:00 committed by Mark Brown
parent 2bd6bf03f4
commit e5af4f9fb3

View File

@ -3907,9 +3907,9 @@ outfree_private_value:
devm_kfree(card->dev, (void *)private_value);
outfree_link_name:
devm_kfree(card->dev, link_name);
outfree_w_param:
for (count = 0 ; count < num_params; count++)
devm_kfree(card->dev, (void *)w_param_text[count]);
outfree_w_param:
devm_kfree(card->dev, w_param_text);
return ret;