]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: cygnus: Remove unnecessary active_slots check
authorChristos Gkekas <chris.gekas@gmail.com>
Sun, 8 Oct 2017 18:20:30 +0000 (19:20 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 9 Oct 2017 08:41:05 +0000 (09:41 +0100)
Variable active_slots is unsigned so checking whether it is less than
zero is not necessary.

Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/bcm/cygnus-ssp.c

index cd8aef8ed8a57cc90da2f3804d97720cf4ea9219..abafadc0b534b4fe7d87a02af3d92e5762227d21 100644 (file)
@@ -986,7 +986,7 @@ static int cygnus_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai,
 
        active_slots = hweight32(tx_mask);
 
-       if ((active_slots < 0) || (active_slots > 16))
+       if (active_slots > 16)
                return -EINVAL;
 
        /* Slot value must be even */