diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-28 14:21:50 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-28 17:33:10 +0100 |
commit | 298402a3858e17e6a78acafa1dcd490167dd9f74 (patch) | |
tree | 7696f718a538f94df7a70a9409a27a9f02ac5d2e /sound/soc/soc-dapm.c | |
parent | ASoC: dapm: Fix source list debugfs outputs (diff) | |
download | linux-298402a3858e17e6a78acafa1dcd490167dd9f74.tar.xz linux-298402a3858e17e6a78acafa1dcd490167dd9f74.zip |
ASoC: dapm: Return -ENOMEM in snd_soc_dapm_new_dai_widgets()
... 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>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index e650e995a8e6..b2949aed1ac2 100644 --- 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; |