From patchwork Sat Oct 14 09:46:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christos Gkekas X-Patchwork-Id: 10006341 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 6F8E9601E9 for ; Sat, 14 Oct 2017 09:46:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CD45291D5 for ; Sat, 14 Oct 2017 09:46:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51E2D291D7; Sat, 14 Oct 2017 09:46:31 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI 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 1F991291D5 for ; Sat, 14 Oct 2017 09:46:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145AbdJNJqS (ORCPT ); Sat, 14 Oct 2017 05:46:18 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:38487 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751185AbdJNJqQ (ORCPT ); Sat, 14 Oct 2017 05:46:16 -0400 Received: by mail-wr0-f196.google.com with SMTP id v91so1155994wrc.5; Sat, 14 Oct 2017 02:46:15 -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=k2DEXStN7yFIzeIk7mkeqwm78pmLnhsip5roMOehURg=; b=F2MO7c9y0ioeAzR50+pFhAdU5FOhAGRSD6lgXjgSvshDXfG6FB8OV/WxNhu7YNt6JE 9/5V266suT5EtckVSiE3+Cj9sJI1s7aVhz427zC+9vR4Wex5jpfsPpL1zphqkZUNnP8S 2c9Ue3mq3Wm77VHPtHw97KfLQd4grzxuR7dH9tJBJXepGIARGFdyi/O5eYaCh+OEG1ao KtlejkKegfsRC4FnIaq0e8WyJghwlkDNgAtYHgZ1226HPbzBUd2sncVtrKyVVnGPVf6Q 0oyBTpSAh0NhPCYVVNNL5u/ThmOZCNmfGaFRO64J7ACR+78PUfk7C9SN8evSD3+MSXr1 MD+g== 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=k2DEXStN7yFIzeIk7mkeqwm78pmLnhsip5roMOehURg=; b=rvJv3TNPV/Wq6LIcvk2+eopismx5gDYeF9yQDRqkqDuyLGqkJLgDGzI5cPF50Or2JT BWqr6DyTbLI001wCEabadUvXyU0ciDtTG4cM3UlhZbRB8YvJeE9jFvsqqb6MjI9TLO8a Z5sRqZymaTpJOFr9Owl8jDWMFvrMaFxYcSaCjY+NksJ+D5BFgCdG2JVBuq4KFwICW/5r XK0ebHfx9yiSoaHY4D1cICUdwIg/yQI9HucPIirl689qQFl4U6vHyE7IJwRBEWEHg6BM AfBe5fro/lGR28WhlCyrrhdcl5nrucIvPu4lLC2IkjLihMABbHYIxv9jg4vG53Cg+ZKG RjKg== X-Gm-Message-State: AMCzsaXBD1mq4phhjp9dpIj7hczttN5eotADDqd4egYh04gOoXqxxkSG Kg5z94J3t0P+S8HfGSdomfU= X-Google-Smtp-Source: AOwi7QBI7ealMT8/LhJLE2PBtjBngotb1nEBMsmyxhBwrzQXgBcqh5Kyc27iuO367Xk+4/eJ0aQSzg== X-Received: by 10.223.144.71 with SMTP id h65mr3639609wrh.41.1507974375023; Sat, 14 Oct 2017 02:46:15 -0700 (PDT) Received: from inspiron ([2a02:c7d:5e0c:c300:4c41:282:53db:800d]) by smtp.gmail.com with ESMTPSA id c37sm5636266wra.73.2017.10.14.02.46.13 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Oct 2017 02:46:14 -0700 (PDT) From: Christos Gkekas To: QCA ath9k Development , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH] ath9k: debug: Remove redundant check Date: Sat, 14 Oct 2017 10:46:11 +0100 Message-Id: <1507974371-7419-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/ath9k/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 01fa301..4f5f141 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -1167,7 +1167,7 @@ static ssize_t write_file_tpc(struct file *file, const char __user *user_buf, if (kstrtoul(buf, 0, &val)) return -EINVAL; - if (val < 0 || val > 1) + if (val > 1) return -EINVAL; tpc_enabled = !!val;