[alsa-devel] [PATCH] ASoC: core: Return -ENOTSUPP instead of -EINVAL if mute is not supported

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Apr 13 20:22:25 CEST 2012


This helps us ignore errors in callers if the operation failed due to not
being available as opposed to an error.

Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
 sound/soc/soc-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1ff0161..b957e68 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3090,7 +3090,7 @@ int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute)
 	if (dai->driver && dai->driver->ops->digital_mute)
 		return dai->driver->ops->digital_mute(dai, mute);
 	else
-		return -EINVAL;
+		return -ENOTSUPP;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dai_digital_mute);
 
-- 
1.7.9.1



More information about the Alsa-devel mailing list