alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: cygnus: Remove unnecessary active_slots check
@ 2017-10-08 18:20 Christos Gkekas
  0 siblings, 0 replies; only message in thread
From: Christos Gkekas @ 2017-10-08 18:20 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, Ray Jui,
	Scott Branden, Jon Mason, bcm-kernel-feedback-list, alsa-devel,
	linux-arm-kernel, linux-kernel
  Cc: Christos Gkekas

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>
---
 sound/soc/bcm/cygnus-ssp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index 15c438f..cb46128 100644
--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -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 */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-08 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-08 18:20 [PATCH] ASoC: cygnus: Remove unnecessary active_slots check Christos Gkekas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).