aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-07-26 08:33:27 -0400
committerMark Brown <broonie@kernel.org>2019-07-26 11:58:58 -0400
commitc8415833ec242b9ddf73bf9e1057e12f9b0fcd16 (patch)
treeb8aa36d0475db11f95c0654aacd8b0fb7162fc9e /sound
parentd8481155a3219ef427c6384022931758fbbe8ebe (diff)
ASoC: codec2codec: fix missing return of error return code
Currently in function snd_soc_dai_link_event_pre_pmu the error return code in variable err is being set but this is not actually being returned, the function just returns zero even when there are failures. Fix this by returning the error return code. Addresses-Coverity: ("Unused value") Fixes: 3dcfb397dad2 ("ASoC: codec2codec: deal with params when necessary") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190726123327.10467-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dapm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index be9bb05b0165..2d183e2d23de 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3776,7 +3776,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
3776 struct snd_pcm_hw_params *params = NULL; 3776 struct snd_pcm_hw_params *params = NULL;
3777 const struct snd_soc_pcm_stream *config = NULL; 3777 const struct snd_soc_pcm_stream *config = NULL;
3778 unsigned int fmt; 3778 unsigned int fmt;
3779 int ret; 3779 int ret = 0;
3780 3780
3781 params = kzalloc(sizeof(*params), GFP_KERNEL); 3781 params = kzalloc(sizeof(*params), GFP_KERNEL);
3782 if (!params) 3782 if (!params)
@@ -3865,7 +3865,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w,
3865 3865
3866out: 3866out:
3867 kfree(params); 3867 kfree(params);
3868 return 0; 3868 return ret;
3869} 3869}
3870 3870
3871static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w, 3871static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,