From patchwork Mon Apr 21 04:53:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 4022341 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 984369F44A for ; Mon, 21 Apr 2014 04:55:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C95452021B for ; Mon, 21 Apr 2014 04:55:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 00F0320218 for ; Mon, 21 Apr 2014 04:55:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751627AbaDUEzK (ORCPT ); Mon, 21 Apr 2014 00:55:10 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:55880 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751573AbaDUEzG (ORCPT ); Mon, 21 Apr 2014 00:55:06 -0400 Received: by mail-pb0-f44.google.com with SMTP id rp16so3355250pbb.31 for ; Sun, 20 Apr 2014 21:55:06 -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:in-reply-to:references :in-reply-to:references; bh=3IHSZZ9fVzJtscXpkNgBwma0PZceqz5cmztD3il56Eo=; b=uYWT2V9iBtsm2qsHQc8x8GCwFSe/hYaIOLH47jKJaqnx0RXK2IS7EqaAyY9b9uvbOJ h1c4SmneS1NWcFAD0OmP4de5/hwYhXJb87Ke529jZvD7qJ1fAmZ9IFoKerOm7kBIJ0vO kcicQZB1LxRz63lPmDFoOLIrAp0MpZdWGPVBoGaBqgaOOVKHXHSfNZ3loh49Kc76pOZ9 SrVG6woq3hFWWz4qesgdZ//mby89EABATzV/cHq4S+FECrutrHOTij4E2/NWThmFew3n pmuruclTgo78xyat8X/4nUnoFgaLnH4HRMtKUVhQjCICihB8GKtHx5KbY7rHsJRm81Gj VmAQ== X-Received: by 10.68.136.41 with SMTP id px9mr36128246pbb.14.1398056106360; Sun, 20 Apr 2014 21:55:06 -0700 (PDT) Received: from localhost.localdomain ([61.157.126.13]) by mx.google.com with ESMTPSA id gj9sm75124104pbc.7.2014.04.20.21.55.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Apr 2014 21:55:05 -0700 (PDT) From: "Zhao, Gang" To: Cc: Johannes Berg Subject: [PATCH 05/12] mac80211: remove unnecessary BUG_ON() Date: Mon, 21 Apr 2014 12:53:00 +0800 Message-Id: X-Mailer: git-send-email 1.9.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 The BUG_ON(!err) can't be triggered in the code path, so remove it. Signed-off-by: Zhao, Gang --- net/mac80211/sta_info.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 137a192..c34a5f9 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -552,7 +552,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU) int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU) { struct ieee80211_local *local = sta->local; - int err = 0; + int err; might_sleep(); @@ -570,7 +570,6 @@ int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU) return 0; out_free: - BUG_ON(!err); sta_info_free(local, sta); return err; }