[alsa-devel] [PATCH] 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.
Signed-off-by: Mark Brown broonie@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);
On Fri, 2012-04-13 at 19:22 +0100, Mark Brown wrote:
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@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);
Acked-by: Liam Girdwood lrg@ti.com
participants (2)
-
Liam Girdwood
-
Mark Brown