summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-jack.c
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2017-07-26 02:35:07 +0200
committerMark Brown <broonie@kernel.org>2017-07-28 15:32:58 +0200
commit77a4525bc282b7072ebda5d6f6925ca6d604a16f (patch)
treea9ab3ed63f698368a010cbffdf26dad289db60b3 /sound/soc/soc-jack.c
parentLinux v4.13-rc1 (diff)
downloadlinux-77a4525bc282b7072ebda5d6f6925ca6d604a16f.tar.xz
linux-77a4525bc282b7072ebda5d6f6925ca6d604a16f.zip
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.c2
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);