Skip to content

Commit

Permalink
ASoC: core: fix invalid free of devm_ allocated data
Browse files Browse the repository at this point in the history
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: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Silviu-Mihai Popescu authored and Mark Brown committed Mar 20, 2013
1 parent e8b18ad commit f7ba716
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4199,7 +4199,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
dev_err(card->dev,
"ASoC: Property '%s' index %d could not be read: %d\n",
propname, 2 * i, ret);
kfree(routes);
return -EINVAL;
}
ret = of_property_read_string_index(np, propname,
Expand All @@ -4208,7 +4207,6 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
dev_err(card->dev,
"ASoC: Property '%s' index %d could not be read: %d\n",
propname, (2 * i) + 1, ret);
kfree(routes);
return -EINVAL;
}
}
Expand Down

0 comments on commit f7ba716

Please sign in to comment.