From patchwork Tue Jun 23 18:11:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John W. Linville" X-Patchwork-Id: 6662671 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 83BB59F40A for ; Tue, 23 Jun 2015 18:15:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C011120672 for ; Tue, 23 Jun 2015 18:15:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 982BF20687 for ; Tue, 23 Jun 2015 18:15:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754976AbbFWSPS (ORCPT ); Tue, 23 Jun 2015 14:15:18 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:51883 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754944AbbFWSPP (ORCPT ); Tue, 23 Jun 2015 14:15:15 -0400 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1Z7Sj0-0004iO-B9; Tue, 23 Jun 2015 14:15:10 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.9/8.14.6) with ESMTP id t5NIB90J006792; Tue, 23 Jun 2015 14:11:09 -0400 Received: (from linville@localhost) by localhost.localdomain (8.14.9/8.14.9/Submit) id t5NIB87X006791; Tue, 23 Jun 2015 14:11:08 -0400 From: "John W. Linville" To: linux-wireless@vger.kernel.org Cc: Johannes Berg , "John W. Linville" Subject: [PATCH] wireless: remove superfluous if statement in regulatory code Date: Tue, 23 Jun 2015 14:11:06 -0400 Message-Id: <1435083066-6750-1-git-send-email-linville@tuxdriver.com> X-Mailer: git-send-email 2.1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In reg_process_hint, the test of "treatment == REG_REQ_IGNORE || treatment == REG_REQ_ALREADY_SET" is superfluous because the code in the if-then branch is identical to the code after the if statement. Coverity CID #1295939 Signed-off-by: John W. Linville --- net/wireless/reg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index d359e0610198..fe6b0c6cca10 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2080,9 +2080,6 @@ static void reg_process_hint(struct regulatory_request *reg_request) return; case NL80211_REGDOM_SET_BY_USER: treatment = reg_process_hint_user(reg_request); - if (treatment == REG_REQ_IGNORE || - treatment == REG_REQ_ALREADY_SET) - return; return; case NL80211_REGDOM_SET_BY_DRIVER: if (!wiphy)