Skip to contentSkip to conversation

ASoC: cygnus: Remove unnecessary active_slots check

PATCH New Christos Gkekas 1 participant 1 message Oct 8, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: cygnus: Remove unnecessary active_slots check

Variable active_slots is unsigned so checking whether it is less than zero is not necessary.

---
 sound/soc/bcm/cygnus-ssp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/bcm/cygnus-ssp.c +1 -1
index 15c438f..cb46128 100644
@@ -998,7 +998,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 */
Signature · 1 line
2.7.4