Commit f7ba716f authored by Silviu-Mihai Popescu's avatar Silviu-Mihai Popescu Committed by Mark Brown

ASoC: core: fix invalid free of devm_ allocated data

The objects allocated by devm_* APIs are managed by devres and are freed when
the device is detached. Hence there is no need to use kfree() explicitly.
Signed-off-by: default avatarSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent e8b18add
...@@ -4199,7 +4199,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, ...@@ -4199,7 +4199,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
dev_err(card->dev, dev_err(card->dev,
"ASoC: Property '%s' index %d could not be read: %d\n", "ASoC: Property '%s' index %d could not be read: %d\n",
propname, 2 * i, ret); propname, 2 * i, ret);
kfree(routes);
return -EINVAL; return -EINVAL;
} }
ret = of_property_read_string_index(np, propname, ret = of_property_read_string_index(np, propname,
...@@ -4208,7 +4207,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, ...@@ -4208,7 +4207,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
dev_err(card->dev, dev_err(card->dev,
"ASoC: Property '%s' index %d could not be read: %d\n", "ASoC: Property '%s' index %d could not be read: %d\n",
propname, (2 * i) + 1, ret); propname, (2 * i) + 1, ret);
kfree(routes);
return -EINVAL; return -EINVAL;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment