ASoC: core: Return -ENOTSUPP instead of -EINVAL if mute is not supported
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.
Signed-off-by Mark Brown <[email protected]>
--- sound/soc/soc-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
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);
Signature · 1 line
1.7.9.1
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.
Signed-off-by Mark Brown <[email protected]>--- sound/soc/soc-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)sound/soc/soc-core.c +0
-0
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);
Acked-by Liam Girdwood <[email protected]>