mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
ALSA: ca0106: fix error code handling
commit ee0761d1d8
upstream.
snd_ca0106_spi_write() returns 1 on error, snd_ca0106_pcm_power_dac()
is returning the error code directly, and the caller is expecting an
negative error code
Signed-off-by: Tong Zhang <ztong0001@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200824224541.1260307-1-ztong0001@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
30b0f412f3
commit
e8e9ec8195
1 changed files with 2 additions and 1 deletions
|
@ -551,7 +551,8 @@ static int snd_ca0106_pcm_power_dac(struct snd_ca0106 *chip, int channel_id,
|
|||
else
|
||||
/* Power down */
|
||||
chip->spi_dac_reg[reg] |= bit;
|
||||
return snd_ca0106_spi_write(chip, chip->spi_dac_reg[reg]);
|
||||
if (snd_ca0106_spi_write(chip, chip->spi_dac_reg[reg]) != 0)
|
||||
return -ENXIO;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue