* [patch] ASoC: wm8741: check for error returns from wm8741_set_pdata()
@ 2015-05-20 7:40 Dan Carpenter
2015-05-20 7:48 ` Charles Keepax
2015-05-20 9:55 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2015-05-20 7:40 UTC (permalink / raw)
To: Liam Girdwood, Sergej Sawazki
Cc: alsa-devel, Lars-Peter Clausen, Takashi Iwai, patches,
kernel-janitors, Mark Brown, Charles Keepax
Static checkers complain that "ret" is always zero so the conditions are
never true.
The intention here was clearly to check for errors from
wm8741_set_pdata(). Although, since wm8741_set_pdata() never returns
errors, it doesn't affect runtime.
Fixes: c354b54cfdf6 ('ASoC: wm8741: Add differential mono mode support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index c065ea1..09ff01f 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -613,7 +613,7 @@ static int wm8741_i2c_probe(struct i2c_client *i2c,
return ret;
}
- wm8741_set_pdata(&i2c->dev, wm8741);
+ ret = wm8741_set_pdata(&i2c->dev, wm8741);
if (ret != 0) {
dev_err(&i2c->dev, "Failed to set pdata: %d\n", ret);
return ret;
@@ -679,7 +679,7 @@ static int wm8741_spi_probe(struct spi_device *spi)
return ret;
}
- wm8741_set_pdata(&spi->dev, wm8741);
+ ret = wm8741_set_pdata(&spi->dev, wm8741);
if (ret != 0) {
dev_err(&spi->dev, "Failed to set pdata: %d\n", ret);
return ret;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] ASoC: wm8741: check for error returns from wm8741_set_pdata()
2015-05-20 7:40 [patch] ASoC: wm8741: check for error returns from wm8741_set_pdata() Dan Carpenter
@ 2015-05-20 7:48 ` Charles Keepax
2015-05-20 9:55 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2015-05-20 7:48 UTC (permalink / raw)
To: Dan Carpenter
Cc: Liam Girdwood, Sergej Sawazki, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Lars-Peter Clausen, patches, alsa-devel,
kernel-janitors
On Wed, May 20, 2015 at 10:40:35AM +0300, Dan Carpenter wrote:
> Static checkers complain that "ret" is always zero so the conditions are
> never true.
>
> The intention here was clearly to check for errors from
> wm8741_set_pdata(). Although, since wm8741_set_pdata() never returns
> errors, it doesn't affect runtime.
>
> Fixes: c354b54cfdf6 ('ASoC: wm8741: Add differential mono mode support')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] ASoC: wm8741: check for error returns from wm8741_set_pdata()
2015-05-20 7:40 [patch] ASoC: wm8741: check for error returns from wm8741_set_pdata() Dan Carpenter
2015-05-20 7:48 ` Charles Keepax
@ 2015-05-20 9:55 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-05-20 9:55 UTC (permalink / raw)
To: Dan Carpenter
Cc: Liam Girdwood, Sergej Sawazki, Jaroslav Kysela, Takashi Iwai,
Charles Keepax, Lars-Peter Clausen, patches, alsa-devel,
kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
On Wed, May 20, 2015 at 10:40:35AM +0300, Dan Carpenter wrote:
> Static checkers complain that "ret" is always zero so the conditions are
> never true.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-20 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 7:40 [patch] ASoC: wm8741: check for error returns from wm8741_set_pdata() Dan Carpenter
2015-05-20 7:48 ` Charles Keepax
2015-05-20 9:55 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).