projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff18620
)
ASoC: dapm: Return -ENOMEM in snd_soc_dapm_new_dai_widgets()
author
Takashi Iwai
<tiwai@suse.de>
Mon, 28 Oct 2013 13:21:50 +0000
(14:21 +0100)
committer
Mark Brown
<broonie@linaro.org>
Mon, 28 Oct 2013 16:33:10 +0000
(09:33 -0700)
... instead of NULL dereferences.
Spotted by coverity CID 402004.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-dapm.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/soc-dapm.c
b/sound/soc/soc-dapm.c
index e650e995a8e6850a25ed4cdbcd2b6bdf1322bf7f..b2949aed1ac2e9bfd374dff8b0a2483ecf19ddf4 100644
(file)
--- a/
sound/soc/soc-dapm.c
+++ b/
sound/soc/soc-dapm.c
@@
-3495,6
+3495,7
@@
int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
if (!w) {
dev_err(dapm->dev, "ASoC: Failed to create %s widget\n",
dai->driver->playback.stream_name);
+ return -ENOMEM;
}
w->priv = dai;
@@
-3513,6
+3514,7
@@
int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
if (!w) {
dev_err(dapm->dev, "ASoC: Failed to create %s widget\n",
dai->driver->capture.stream_name);
+ return -ENOMEM;
}
w->priv = dai;