From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753264AbdJHSUi (ORCPT ); Sun, 8 Oct 2017 14:20:38 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:32948 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751544AbdJHSUg (ORCPT ); Sun, 8 Oct 2017 14:20:36 -0400 X-Google-Smtp-Source: AOwi7QDecem0r1uumAsD+MklsEgNYFciuIk0+JcINqTpLcAj7CP+YEdSZSn3HDnK/2hcN+LAQfxjQw== From: Christos Gkekas To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Ray Jui , Scott Branden , Jon Mason , bcm-kernel-feedback-list@broadcom.com, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH] ASoC: cygnus: Remove unnecessary active_slots check Date: Sun, 8 Oct 2017 19:20:30 +0100 Message-Id: <1507486830-21507-1-git-send-email-chris.gekas@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable active_slots is unsigned so checking whether it is less than zero is not necessary. Signed-off-by: Christos Gkekas --- 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