summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-08-10 13:22:58 +0400
committerTakashi Iwai <tiwai@suse.de>2012-08-10 14:11:21 +0400
commitde64c0ee7dbcbfbbe63bd9ea45783d87babc6452 (patch)
tree11161140fa15d300df0db9212298b961629f58d6 /sound
parent144dad99ef6ad10c8c8ebe787d08157c4a94201f (diff)
downloadlinux-de64c0ee7dbcbfbbe63bd9ea45783d87babc6452.tar.xz
ALSA: cs46xx - signedness bug in snd_cs46xx_codec_read()
This function returns its own error codes instead of normal negative error codes. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index f75f5ffdfdfb..a71d1c14a0f6 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -94,7 +94,7 @@ static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip,
if (snd_BUG_ON(codec_index != CS46XX_PRIMARY_CODEC_INDEX &&
codec_index != CS46XX_SECONDARY_CODEC_INDEX))
- return -EINVAL;
+ return 0xffff;
chip->active_ctrl(chip, 1);