diff options
author | Mark Brown <broonie@kernel.org> | 2015-03-04 21:42:43 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-04 21:42:43 +0100 |
commit | 2824ef9b81b0d440ed63e87f67f01f5cc942457f (patch) | |
tree | 2e93d8255a13d21d13fdf79ea6ce4e4243f95cbf /sound | |
parent | Merge remote-tracking branch 'asoc/fix/samsung' into asoc-linus (diff) | |
parent | ASoC: simple-card: Add a NULL pointer check in asoc_simple_card_dai_link_of (diff) | |
download | linux-2824ef9b81b0d440ed63e87f67f01f5cc942457f.tar.xz linux-2824ef9b81b0d440ed63e87f67f01f5cc942457f.zip |
Merge remote-tracking branch 'asoc/fix/simple' into asoc-linus
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/generic/simple-card.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index f7c6734bd5da..fb550b5869d2 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -372,6 +372,11 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, strlen(dai_link->cpu_dai_name) + strlen(dai_link->codec_dai_name) + 2, GFP_KERNEL); + if (!name) { + ret = -ENOMEM; + goto dai_link_of_err; + } + sprintf(name, "%s-%s", dai_link->cpu_dai_name, dai_link->codec_dai_name); dai_link->name = dai_link->stream_name = name; |