ASoC: jack: fix snd_soc_codec_set_jack return error
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Wed, 26 Jul 2017 00:35:07 +0000 (02:35 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 28 Jul 2017 13:32:58 +0000 (14:32 +0100)
commit77a4525bc282b7072ebda5d6f6925ca6d604a16f
treea9ab3ed63f698368a010cbffdf26dad289db60b3
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
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>
sound/soc/soc-jack.c