diff options
author | Zidan Wang <zidan.wang@freescale.com> | 2015-11-27 11:22:32 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@nxp.com> | 2016-01-14 11:02:29 -0600 |
commit | c0bc7f8b38bab74313e402cf9a79e6c09e22a534 (patch) | |
tree | 3f011df584f5b35d1b59ba9125056a3b27228433 /sound | |
parent | 356a08b9e2ce55457e5452dc50c594b36378821a (diff) |
MLK-11915-09 ASoC: cs42xx8: remove the no effect comparison
rate_tx and rate_rx are always greater than or equal to 0, so remove the
no effect comparison. Reported by Coverity.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit d5957250784a27cf6f6f421d8a6e0ba45b4bbc18)
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/cs42xx8.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c index 28b653312d63..ffe04a0b5bdf 100644 --- a/sound/soc/codecs/cs42xx8.c +++ b/sound/soc/codecs/cs42xx8.c @@ -260,7 +260,7 @@ static int cs42xx8_hw_params(struct snd_pcm_substream *substream, fm_rx = CS42XX8_FM_AUTO; fm_tx = CS42XX8_FM_AUTO; } else { - if (rate_tx >= 0 && rate_tx < 50000) + if (rate_tx < 50000) fm_tx = CS42XX8_FM_SINGLE; else if (rate_tx > 50000 && rate_tx < 100000) fm_tx = CS42XX8_FM_DOUBLE; @@ -271,7 +271,7 @@ static int cs42xx8_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - if (rate_rx >= 0 && rate_rx < 50000) + if (rate_rx < 50000) fm_rx = CS42XX8_FM_SINGLE; else if (rate_rx > 50000 && rate_rx < 100000) fm_rx = CS42XX8_FM_DOUBLE; |