ASoC: sigmadsp: Fix missleading return value
PATCH 1/1 ASoC: sigmadsp: Fix missleading return value
From: Pascal Huerst <[email protected]>
Forwarding the return value of i2c_master_send, leads to errors later on, since i2c_master_send returns the number of bytes transmittet. Check for ret < 0 instead and return 0 otherwise.
--- sound/soc/codecs/sigmadsp-i2c.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/codecs/sigmadsp-i2c.c +4 -1
@@ -31,7 +31,10 @@ static int sigmadsp_write_i2c(void *control_data,kfree (buf); -return ret; +if (ret <0 ) +return ret; + +return 0 ; } static int sigmadsp_read_i2c(void *control_data,
Signature · 1 line
2.4.3
Quoted 7 lines · On 02/10/2016 03:51 PM, [email protected] wrote:
From: Pascal Huerst <[email protected]>
Forwarding the return value of
i2c_master_send, leads to errors later on, sincei2c_master_sendreturns the number of bytes transmittet. Check for ret < 0 instead and return 0 otherwise.Signed-off-by Pascal Huerst <[email protected]>
Thanks.
Please resend to the ASoC maintainers otherwise it wont get picked up.
Quoted 21 lines
--- sound/soc/codecs/sigmadsp-i2c.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)sound/soc/codecs/sigmadsp-i2c.c +4
-1@@ -31,7 +31,10 @@ static int sigmadsp_write_i2c(void *control_data,kfree (buf); -return ret; +if (ret <0 ) +return ret; + +return 0 ; } static int sigmadsp_read_i2c(void *control_data,
Mark Brown
maintainerApplied "ASoC: sigmadsp: Fix missleading return value" to the asoc tree
In reply to [email protected]The patch
ASoC: sigmadsp: Fix missleading return value
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
61c4a1ac4d900e743af0b363fe520405939eab47Mon Sep 17 00:00:00 2001
From: Pascal Huerst <[email protected]>
Date: Wed, 10 Feb 2016 15:59:28 +0100
Subject: [PATCH] ASoC: sigmadsp: Fix missleading return value
Forwarding the return value of i2c_master_send, leads to errors later on, since i2c_master_send returns the number of bytes transmittet. Check for ret < 0 instead and return 0 otherwise.
--- sound/soc/codecs/sigmadsp-i2c.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/codecs/sigmadsp-i2c.c +4 -1
@@ -31,7 +31,10 @@ static int sigmadsp_write_i2c(void *control_data,kfree (buf); -return ret; +if (ret <0 ) +return ret; + +return 0 ; } static int sigmadsp_read_i2c(void *control_data,
Signature · 1 line
2.7.0