lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 26 Jul 2017 02:35:07 +0200 From: srinivas.kandagatla@...aro.org To: Mark Brown <broonie@...nel.org>, Banajit Goswami <bgoswami@...eaurora.org>, alsa-devel@...a-project.org Cc: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, Patrick Lai <plai@...eaurora.org>, linux-kernel@...r.kernel.org, Srinivas Kandagatla <srinivas.kandagatla@...aro.org> Subject: [PATCH v1 1/6] ASoC: jack: fix snd_soc_codec_set_jack return error From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org> 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@...aro.org> --- sound/soc/soc-jack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 7daf21f..42ca9f1 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); -- 2.9.3
Powered by blists - more mailing lists