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

Liam Girdwood lrg at ti.com
Mon Apr 16 17:00:33 CEST 2012


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 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);
>  

Acked-by: Liam Girdwood <lrg at ti.com>



More information about the Alsa-devel mailing list