diff mbox series

ALSA: snd_ice1712: Check correct return value to snd_i2c_sendbytes (EWS/DMX 6Fire)

Message ID cdac9547-b08f-62d4-d29a-89a4f92c3225@rncbc.org (mailing list archive)
State New, archived
Headers show
Series ALSA: snd_ice1712: Check correct return value to snd_i2c_sendbytes (EWS/DMX 6Fire) | expand

Commit Message

Rui Nuno Capela June 7, 2019, 2:13 p.m. UTC
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.

Signed-off-by: Rui Nuno Capela <rncbc@rncbc.org>

Comments

Takashi Iwai June 11, 2019, 10:07 a.m. UTC | #1
On Fri, 07 Jun 2019 16:13:37 +0200,
Rui Nuno Capela wrote:
> 
> 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.
> 
> Signed-off-by: Rui Nuno Capela <rncbc@rncbc.org>
> 
> 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.
> 
> Signed-off-by: Rui Nuno Capela <rncbc@rncbc.org>

Thanks, applied with Cc-to-stable now.


Takashi


> 
> --- a/sound/pci/ice1712/ews.c	2019-06-04 06:59:45.000000000 +0100
> +++ b/sound/pci/ice1712/ews.c	2019-06-07 11:04:01.735954865 +0100
> @@ -826,7 +826,7 @@
>  
>  	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;
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
diff mbox series

Patch

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.

Signed-off-by: Rui Nuno Capela <rncbc@rncbc.org>


--- a/sound/pci/ice1712/ews.c	2019-06-04 06:59:45.000000000 +0100
+++ b/sound/pci/ice1712/ews.c	2019-06-07 11:04:01.735954865 +0100
@@ -826,7 +826,7 @@ 
 
 	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;