Skip to contentSkip to conversation

ASoC: core: Return -ENOTSUPP instead of -EINVAL if mute is not supported

PATCH In review Mark Brown 2 participants 2 messages Apr 13, 2012 – Apr 16, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: core: Return -ENOTSUPP instead of -EINVAL if mute is not supported

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

---
 sound/soc/soc-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/soc-core.c +1 -1
index 1ff0161..b957e68 100644
@@ -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);
 
Signature · 1 line
1.7.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Mark Brown

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

---
 sound/soc/soc-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/soc-core.c +0 -0
index 1ff0161..b957e68 100644

sound/soc/soc-core.c int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute) · line 3096

Quoted 8 lines
sound/soc/soc-core.c +1 -1
@@ -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);