From 89831cff507e5a77a9eb2a4f3c44774c211d92b9 Mon Sep 17 00:00:00 2001 From: Zidan Wang Date: Fri, 27 Nov 2015 11:22:32 +0800 Subject: [PATCH] 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 (cherry picked from commit d5957250784a27cf6f6f421d8a6e0ba45b4bbc18) --- sound/soc/codecs/cs42xx8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c index 599f802f78bc..76b1b7626e05 100644 --- a/sound/soc/codecs/cs42xx8.c +++ b/sound/soc/codecs/cs42xx8.c @@ -264,7 +264,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; @@ -275,7 +275,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; -- 2.17.1