From patchwork Wed Mar 19 09:04:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 3858171 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 010D1BF540 for ; Wed, 19 Mar 2014 18:07:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 391D1200DC for ; Wed, 19 Mar 2014 18:07:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 632E92021A for ; Wed, 19 Mar 2014 18:07:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758516AbaCSJEt (ORCPT ); Wed, 19 Mar 2014 05:04:49 -0400 Received: from mail-pb0-f51.google.com ([209.85.160.51]:35665 "EHLO mail-pb0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758391AbaCSJEr (ORCPT ); Wed, 19 Mar 2014 05:04:47 -0400 Received: by mail-pb0-f51.google.com with SMTP id uo5so8630019pbc.38 for ; Wed, 19 Mar 2014 02:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Eg3rPHP1a8HXhVDHGm7X0EFDTNxg5HOxRZle5Cn7hNY=; b=d4y5K8z1hpxosjtnNm+QEyAVy5pdh6U0qLHkFI2iQOhjquMeGVIX+WfAqEAICEcYRH Tr9SU+G2zR/Lu6U+M8YUnq94r466G3h55zViXTvukBfuy7zLJYZ7kuhRT9YZmvcnIcaE vsCTQaUrdSfpHpvW2wZC8L3sbUyENXXRyKcFQKqLjQ6531wD8ZBOMvYITGPcJVcdXJvK iGEwrG9XR3nYDyvM7dzjObCJvxNwsfgTo2UBqL7cKSdBapbkhaJYa1rZ5an08UTNbNvy fmEi2x+LB1R2GeE1+n5ifWW/xZYtlD6d0iUfPEIZHqfzAl4tAV7yvGkqVe6wzujJkYyH UTJg== X-Received: by 10.66.122.36 with SMTP id lp4mr39019024pab.82.1395219887167; Wed, 19 Mar 2014 02:04:47 -0700 (PDT) Received: from localhost.localdomain ([175.153.40.115]) by mx.google.com with ESMTPSA id qq5sm60201510pbb.24.2014.03.19.02.04.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Mar 2014 02:04:46 -0700 (PDT) From: "Zhao, Gang" To: Cc: Johannes Berg Subject: [PATCH 1/3] cfg80211: remove unnecessary check Date: Wed, 19 Mar 2014 17:04:35 +0800 Message-Id: <195ce75d7f8c2db484ccea7453147289e880c148.1395219362.git.gamerh2o@gmail.com> X-Mailer: git-send-email 1.8.5.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 RCU pointer bss->pub.beacon_ies is checked before in previous statement: if (rcu_access_pointer(bss->pub.beacon_ies)) continue; There is no need to check it twice(and in the wrong way :) ). Signed-off-by: Zhao, Gang --- net/wireless/scan.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index d1ed4ae..7297d18 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -659,9 +659,6 @@ static bool cfg80211_combine_bsses(struct cfg80211_registered_device *dev, continue; if (ssidlen && ie[1] != ssidlen) continue; - /* that would be odd ... */ - if (bss->pub.beacon_ies) - continue; if (WARN_ON_ONCE(bss->pub.hidden_beacon_bss)) continue; if (WARN_ON_ONCE(!list_empty(&bss->hidden_list)))