Skip to content

Commit

Permalink
ASoC: wm8741: check for error returns from wm8741_set_pdata()
Browse files Browse the repository at this point in the history
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: c354b54 ('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>
  • Loading branch information
Dan Carpenter authored and Mark Brown committed May 20, 2015
1 parent c354b54 commit 2d52d17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8741.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2d52d17

Please sign in to comment.