From patchwork Sat Oct 14 09:41:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christos Gkekas X-Patchwork-Id: 10006335 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ECEB1601E9 for ; Sat, 14 Oct 2017 09:41:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4C58291C6 for ; Sat, 14 Oct 2017 09:41:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D984C291CA; Sat, 14 Oct 2017 09:41:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94C35291C6 for ; Sat, 14 Oct 2017 09:41:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751753AbdJNJlV (ORCPT ); Sat, 14 Oct 2017 05:41:21 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:45061 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbdJNJlU (ORCPT ); Sat, 14 Oct 2017 05:41:20 -0400 Received: by mail-wm0-f65.google.com with SMTP id q124so25295842wmb.0; Sat, 14 Oct 2017 02:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=9k6VCgJJrS8yLKUh69fX0lCmFqTTU9+W5DsEfVH/h0g=; b=DOUE0J34EY6Bu+rWh9DB0NlwFLH+3GUWSi1y0qXMPkzarfUg5t3uV8pukpPP0WnKbZ 5gxaniaI1dsWHVm2Dars5ICFlSKCeaiqDu80biRpNQjEZNwyWEf13cCfSi0Y/pwSmPtw 7+R/R7JzrgvaRgfDtUz/p6D7huCX2rSBBpehdIJRHwpxN7gxokYuXsjMf+sg0SlQGumW 5ehFgUF0ZzXQXTKcfReAg7E++g97S8iDGbJKidIQWeOnJ0mfDJxeHF7huAnUXdcfCHYH 2JnVfkQ/8XqTXjxcOSWyNmxrPObwr8yrZazCojqXTj1RasKp+CJNi+dfWAa1iYhz58AF nBCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9k6VCgJJrS8yLKUh69fX0lCmFqTTU9+W5DsEfVH/h0g=; b=bW83UBbZPwAuMBav4uGsHKptIqiOHesuWRW7+eVVqgj769MU9eUhM8mE9PoCvNJdBK aRur+vvzmv9mGPkPlki/2ZuvftuA7lUD2rm7mzMiyisPxE1i+acWF2J5cwmIjIHXJ+xQ QJwhBspuVQU9tgQSSdaYz4xguerUeM+olQIi4laHthnX0P6qxKfCq4n8HFTK6ppLUMqW 64mMvqngfEfocbO79ydz07XnO+06/1iqyvMQTsPJRkjME4S6WFPfgjPrSZF3Ea81HB14 9lsqlpkY/1q7kr5kU5jWY42Qk0xxTwgTEp2qaxRmjIZlPX8oDHmNYNEaPNqSmj2jfSEL lEkw== X-Gm-Message-State: AMCzsaVEvBpqTifiv13DE9Pml3zDklmAXp9xYCmlPuLyL+jpYOXq1K1Q uIisZJkfyfxbqCJtPkZgVZ6a6CfqAJg= X-Google-Smtp-Source: ABhQp+Quju4GO/QVAwd4Yf42jzfrfibJT417ZeoV6cG6/aBLUE7VoUCgAC1kS7I1zw2EY6yjqOBBWQ== X-Received: by 10.28.169.21 with SMTP id s21mr3078213wme.87.1507974078572; Sat, 14 Oct 2017 02:41:18 -0700 (PDT) Received: from inspiron ([2a02:c7d:5e0c:c300:4c41:282:53db:800d]) by smtp.gmail.com with ESMTPSA id w126sm2810084wme.25.2017.10.14.02.41.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Oct 2017 02:41:17 -0700 (PDT) From: Christos Gkekas To: Kalle Valo , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH] ath10k: spectral: Remove redundant check Date: Sat, 14 Oct 2017 10:41:15 +0100 Message-Id: <1507974075-6987-1-git-send-email-chris.gekas@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Variable val is unsigned, so checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas --- drivers/net/wireless/ath/ath10k/spectral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/spectral.c b/drivers/net/wireless/ath/ath10k/spectral.c index dd9cc09..2048b1e 100644 --- a/drivers/net/wireless/ath/ath10k/spectral.c +++ b/drivers/net/wireless/ath/ath10k/spectral.c @@ -406,7 +406,7 @@ static ssize_t write_file_spectral_count(struct file *file, if (kstrtoul(buf, 0, &val)) return -EINVAL; - if (val < 0 || val > 255) + if (val > 255) return -EINVAL; mutex_lock(&ar->conf_mutex);