diff options
author | Rui Nuno Capela <rncbc@rncbc.org> | 2019-06-07 15:13:37 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-06-11 12:06:54 +0200 |
commit | 352bcae97f9ba87801f497571cdec20af190efe1 (patch) | |
tree | 7682ce143f678346493d6e149769504fc8ae13cf /sound | |
parent | d8fa87c368f5b4096c4746894fdcc195da285df1 (diff) |
ALSA: ice1712: Check correct return value to snd_i2c_sendbytes (EWS/DMX 6Fire)
Check for exact and correct return value to snd_i2c_sendbytes
call for EWS/DMX 6Fire (snd_ice1712).
Fixes a systemic error on every boot starting from kernel 5.1
onwards to snd_ice1712 driver ("cannot send pca") on Terratec
EWS/DMX 6Fire PCI soundcards.
Check for exact and correct return value to snd_i2c_sendbytes
call for EWS/DMX 6Fire (snd_ice1712).
Fixes a systemic error on every boot to snd_ice1712 driver
("cannot send pca") on Terratec EWS/DMX 6Fire PCI soundcards.
Fixes: c99776cc4018 ("ALSA: ice1712: fix a missing check of snd_i2c_sendbytes")
Signed-off-by: Rui Nuno Capela <rncbc@rncbc.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ice1712/ews.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c index 7646c93e8268..d492dde88e16 100644 --- a/sound/pci/ice1712/ews.c +++ b/sound/pci/ice1712/ews.c @@ -826,7 +826,7 @@ static int snd_ice1712_6fire_read_pca(struct snd_ice1712 *ice, unsigned char reg snd_i2c_lock(ice->i2c); byte = reg; - if (snd_i2c_sendbytes(spec->i2cdevs[EWS_I2C_6FIRE], &byte, 1)) { + if (snd_i2c_sendbytes(spec->i2cdevs[EWS_I2C_6FIRE], &byte, 1) != 1) { snd_i2c_unlock(ice->i2c); dev_err(ice->card->dev, "cannot send pca\n"); return -EIO; |