[alsa-devel] [PATCH 3/5] ASoC: DAPM: Fix uninitialized return value from snd_soc_dai_link_event()
Takashi Iwai
tiwai at suse.de
Mon Oct 28 14:21:48 CET 2013
In a slightest path (both source and sink hw_params are NULL), the
function may return an uninitialized value.
Spotted by coverity CID 703453.
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
sound/soc/soc-dapm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index d2ff080..c21c8e7 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3428,6 +3428,8 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
goto out;
}
}
+
+ ret = 0;
break;
case SND_SOC_DAPM_POST_PMU:
--
1.8.4.1
More information about the Alsa-devel
mailing list