diff mbox series

ASoC: tas2562: Propagate the error in tas2562_dac_event()

Message ID 20220913231706.516849-1-festevam@gmail.com
State New
Headers show
Series ASoC: tas2562: Propagate the error in tas2562_dac_event() | expand

Commit Message

Fabio Estevam Sept. 13, 2022, 11:17 p.m. UTC
From: Fabio Estevam <festevam@denx.de>

Since commit 2848d34c3ba1 ("ASoC: tas2562: Fix mute/unmute") the
following build warning is seen:

sound/soc/codecs/tas2562.c:442:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]

Fix the warning by returning the 'ret' variable.

Fixes: 2848d34c3ba1 ("ASoC: tas2562: Fix mute/unmute")
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 sound/soc/codecs/tas2562.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Brown Sept. 14, 2022, 11:05 a.m. UTC | #1
On Tue, 13 Sep 2022 20:17:06 -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Since commit 2848d34c3ba1 ("ASoC: tas2562: Fix mute/unmute") the
> following build warning is seen:
> 
> sound/soc/codecs/tas2562.c:442:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
> 
> [...]

Applied to

   broonie/sound.git for-next

Thanks!

[1/1] ASoC: tas2562: Propagate the error in tas2562_dac_event()
      commit: 3e9a838634b181b5775d3459f05c2055d24d080a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c
index 66149055aba9..b486d0bd86c9 100644
--- a/sound/soc/codecs/tas2562.c
+++ b/sound/soc/codecs/tas2562.c
@@ -439,7 +439,7 @@  static int tas2562_dac_event(struct snd_soc_dapm_widget *w,
 	struct snd_soc_component *component =
 					snd_soc_dapm_to_component(w->dapm);
 	struct tas2562_data *tas2562 = snd_soc_component_get_drvdata(component);
-	int ret;
+	int ret = 0;
 
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
@@ -455,7 +455,7 @@  static int tas2562_dac_event(struct snd_soc_dapm_widget *w,
 		return -EINVAL;
 	}
 
-	return 0;
+	return ret;
 }
 
 static int tas2562_volume_control_get(struct snd_kcontrol *kcontrol,