diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-05-20 09:40:35 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-05-20 11:55:10 +0200 |
commit | 2d52d172398249f523b24cff9b84aee4e7b8e1b6 (patch) | |
tree | b3520141a58adb3a2a4aba6738b15f9fbd186330 | |
parent | ASoC: wm8741: Add differential mono mode support (diff) | |
download | linux-2d52d172398249f523b24cff9b84aee4e7b8e1b6.tar.xz linux-2d52d172398249f523b24cff9b84aee4e7b8e1b6.zip |
ASoC: wm8741: check for error returns from wm8741_set_pdata()
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/wm8741.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c index c065ea166875..09ff01f2fc1e 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; |