ASoC: core: Return -ENOTSUPP instead of -EINVAL if mute is not supported
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 13 Apr 2012 18:16:03 +0000 (19:16 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 16 Apr 2012 18:36:29 +0000 (19:36 +0100)
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>
Acked-by: Liam Girdwood <lrg@ti.com>
sound/soc/soc-core.c

index 8a17048dba42693cdc17201bc76f96c8b37729a3..98a4f7aa4f01b49a50daa9c83442273a65688ac4 100644 (file)
@@ -3031,7 +3031,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);