diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2017-07-26 02:35:07 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-07-28 14:32:58 +0100 |
commit | 77a4525bc282b7072ebda5d6f6925ca6d604a16f (patch) | |
tree | a9ab3ed63f698368a010cbffdf26dad289db60b3 /sound/soc/soc-jack.c | |
parent | 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff) |
ASoC: jack: fix snd_soc_codec_set_jack return error
This patch changes the error code returned by snd_soc_codec_set_jack()
from -EINVAL to -ENOTSUPP. The reason to do this is to make the caller
aware that the underlying codec does not support this callback. This can
make the caller write the code to handle this case properly.
Other reason is that -EINVAL is not the correct error to return in this
case anyway.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-jack.c')
-rw-r--r-- | sound/soc/soc-jack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 7daf21fee355..42ca9f19843b 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -36,7 +36,7 @@ int snd_soc_codec_set_jack(struct snd_soc_codec *codec, if (codec->driver->set_jack) return codec->driver->set_jack(codec, jack, data); else - return -EINVAL; + return -ENOTSUPP; } EXPORT_SYMBOL_GPL(snd_soc_codec_set_jack); |