From: Dan Carpenter <dan.carpenter@oracle.com>
To: Liam Girdwood <lgirdwood@gmail.com>, Sergej Sawazki <ce3a@gmx.de>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
Takashi Iwai <tiwai@suse.de>,
patches@opensource.wolfsonmicro.com,
kernel-janitors@vger.kernel.org, Mark Brown <broonie@kernel.org>,
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Subject: [patch] ASoC: wm8741: check for error returns from wm8741_set_pdata()
Date: Wed, 20 May 2015 07:40:35 +0000 [thread overview]
Message-ID: <20150520074035.GB18278@mwanda> (raw)
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;
next reply other threads:[~2015-05-20 7:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 7:40 Dan Carpenter [this message]
2015-05-20 7:48 ` [patch] ASoC: wm8741: check for error returns from wm8741_set_pdata() Charles Keepax
2015-05-20 9:55 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150520074035.GB18278@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ce3a@gmx.de \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=patches@opensource.wolfsonmicro.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox