diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-26 15:07:57 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-26 15:07:57 +0100 |
commit | 23af7b0bba404325755d35bfff64307fa23071e1 (patch) | |
tree | 640ff0f5e7ff14a1b4ab6e4031521064d185dc6f | |
parent | Merge remote-tracking branch 'asoc/fix/adsp' into asoc-next (diff) | |
parent | ASoC: core: fix invalid free of devm_ allocated data (diff) | |
download | linux-23af7b0bba404325755d35bfff64307fa23071e1.tar.xz linux-23af7b0bba404325755d35bfff64307fa23071e1.zip |
Merge remote-tracking branch 'asoc/fix/core' into asoc-next
-rw-r--r-- | sound/soc/soc-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b7e84a7cd9ee..507d251916af 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3140,7 +3140,7 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, if (params->mask) { ret = regmap_read(codec->control_data, params->base, &val); if (ret != 0) - return ret; + goto out; val &= params->mask; @@ -3158,13 +3158,15 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, ((u32 *)data)[0] |= cpu_to_be32(val); break; default: - return -EINVAL; + ret = -EINVAL; + goto out; } } ret = regmap_raw_write(codec->control_data, params->base, data, len); +out: kfree(data); return ret; @@ -4197,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, @@ -4206,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; } } |