diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2016-03-17 21:14:36 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-03-17 14:11:36 +0100 |
commit | 6f0217441839c258b82dd83ee15082666d6ab9c2 (patch) | |
tree | eccc1e33f697a87dd06a52b951c0362e2cf644be /sound/core/control_compat.c | |
parent | 8cf3968ccb4e6768425ed3e26124e690046cc023 (diff) | |
download | op-kernel-dev-6f0217441839c258b82dd83ee15082666d6ab9c2.zip op-kernel-dev-6f0217441839c258b82dd83ee15082666d6ab9c2.tar.gz |
ALSA: ctl: change return value in compatibility layer so that it's the same value in core implementation
In control compatibility layer, when no elements are found by
ELEM_READ/ELEM_WRITE ioctl commands, ENXIO is returned. On the other hand,
in core implementation, ENOENT is returned. This is not good for
ALSA ctl applications.
This commit changes the return value from the compatibility layer so
that the same value is returned.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/control_compat.c')
-rw-r--r-- | sound/core/control_compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c index 0608f21..1fa7076 100644 --- a/sound/core/control_compat.c +++ b/sound/core/control_compat.c @@ -196,7 +196,7 @@ static int get_ctl_type(struct snd_card *card, struct snd_ctl_elem_id *id, kctl = snd_ctl_find_id(card, id); if (! kctl) { up_read(&card->controls_rwsem); - return -ENXIO; + return -ENOENT; } info = kzalloc(sizeof(*info), GFP_KERNEL); if (info == NULL) { |