]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - pending-5.1/alsa-ice1712-check-correct-return-value-to-snd_i2c_sendbytes-ews-dmx-6fire.patch
move existing queues out of the way for the moment...
[thirdparty/kernel/stable-queue.git] / pending-5.1 / alsa-ice1712-check-correct-return-value-to-snd_i2c_sendbytes-ews-dmx-6fire.patch
1 From 352bcae97f9ba87801f497571cdec20af190efe1 Mon Sep 17 00:00:00 2001
2 From: Rui Nuno Capela <rncbc@rncbc.org>
3 Date: Fri, 7 Jun 2019 15:13:37 +0100
4 Subject: ALSA: ice1712: Check correct return value to snd_i2c_sendbytes (EWS/DMX 6Fire)
5
6 From: Rui Nuno Capela <rncbc@rncbc.org>
7
8 commit 352bcae97f9ba87801f497571cdec20af190efe1 upstream.
9
10 Check for exact and correct return value to snd_i2c_sendbytes
11 call for EWS/DMX 6Fire (snd_ice1712).
12
13 Fixes a systemic error on every boot starting from kernel 5.1
14 onwards to snd_ice1712 driver ("cannot send pca") on Terratec
15 EWS/DMX 6Fire PCI soundcards.
16
17 Check for exact and correct return value to snd_i2c_sendbytes
18 call for EWS/DMX 6Fire (snd_ice1712).
19
20 Fixes a systemic error on every boot to snd_ice1712 driver
21 ("cannot send pca") on Terratec EWS/DMX 6Fire PCI soundcards.
22
23 Fixes: c99776cc4018 ("ALSA: ice1712: fix a missing check of snd_i2c_sendbytes")
24 Signed-off-by: Rui Nuno Capela <rncbc@rncbc.org>
25 Cc: <stable@vger.kernel.org>
26 Signed-off-by: Takashi Iwai <tiwai@suse.de>
27 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28
29 ---
30 sound/pci/ice1712/ews.c | 2 +-
31 1 file changed, 1 insertion(+), 1 deletion(-)
32
33 --- a/sound/pci/ice1712/ews.c
34 +++ b/sound/pci/ice1712/ews.c
35 @@ -826,7 +826,7 @@ static int snd_ice1712_6fire_read_pca(st
36
37 snd_i2c_lock(ice->i2c);
38 byte = reg;
39 - if (snd_i2c_sendbytes(spec->i2cdevs[EWS_I2C_6FIRE], &byte, 1)) {
40 + if (snd_i2c_sendbytes(spec->i2cdevs[EWS_I2C_6FIRE], &byte, 1) != 1) {
41 snd_i2c_unlock(ice->i2c);
42 dev_err(ice->card->dev, "cannot send pca\n");
43 return -EIO;