diff options
author | 2016-02-23 07:45:14 +0100 | |
---|---|---|
committer | 2016-02-24 13:07:02 +0900 | |
commit | 127a9cbb5860a7cf15f4d4703ab0454e4603e8ac (patch) | |
tree | e8670d453327f73f82221d119f017acc97f199c5 /sound/soc | |
parent | ASoC: max9867: Constify max9867_reg and max9867_regmap (diff) | |
download | linux-127a9cbb5860a7cf15f4d4703ab0454e4603e8ac.tar.gz linux-127a9cbb5860a7cf15f4d4703ab0454e4603e8ac.tar.bz2 linux-127a9cbb5860a7cf15f4d4703ab0454e4603e8ac.zip |
ASoC: max9867: fix type of variable containing error codes
value variable can contain error values and is compared with zero.
Its type must be signed.
The problem has been detected using coccinelle script
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rwxr-xr-x | sound/soc/codecs/max9867.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index ab7a94db8db7..4fb6fc7188c7 100755 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -180,7 +180,8 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream, { struct snd_soc_codec *codec = dai->codec; struct max9867_priv *max9867 = snd_soc_codec_get_drvdata(codec); - unsigned int ni_h, ni_l, value; + unsigned int ni_h, ni_l; + int value; value = get_ni_value(max9867->sysclk, params_rate(params)); if (value < 0) |