From: Dan Carpenter Date: Fri, 10 Aug 2012 09:22:58 +0000 (+0300) Subject: ALSA: cs46xx - signedness bug in snd_cs46xx_codec_read() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=de64c0ee7dbcbfbbe63bd9ea45783d87babc6452;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Takashi Iwai --- 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);