From patchwork Fri Aug 22 13:18:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 4763771 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 E9609C0338 for ; Fri, 22 Aug 2014 13:18:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B3262017A for ; Fri, 22 Aug 2014 13:18:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4155020158 for ; Fri, 22 Aug 2014 13:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756200AbaHVNSY (ORCPT ); Fri, 22 Aug 2014 09:18:24 -0400 Received: from mail-ig0-f172.google.com ([209.85.213.172]:54423 "EHLO mail-ig0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756184AbaHVNSW (ORCPT ); Fri, 22 Aug 2014 09:18:22 -0400 Received: by mail-ig0-f172.google.com with SMTP id h15so14885959igd.5 for ; Fri, 22 Aug 2014 06:18:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B+uDv4Dkv5p428UVzNQSSiXx2LhKnt5C+Ot8yrj2qBQ=; b=CecfoP1+cLHrVsc1/rf/vLTAQ4PPBSnigPQLduqBuoHFqLZv3AkL5TbfOiU4Lj0j0o ifihMtzqN6bx6thS6A2zz1RDgHvjfv5VFsJeJWFcs8lIgL+lmgyegUJ5SO6ejGDJEhJQ UBbXsy8lWcgPibFYUmtDATHzbRz5RRmnbJ4u8L24M1w7b+2M7w8jmuhxTyTF5ReUgZCa ilqXLqwitFqOm1sb6M3kBsOdbM46CF1/6CifRIJoL1lhcZZuZluYXxsp9kBcL77OMJwn yn/1sfQ+ZMWoDBZegFOj4biAiovXMpGbcrADgSPRlEFiDZN8lvrJoVTv603Vd1Gnc5cm znRg== X-Gm-Message-State: ALoCoQnc5paCpBs8MX/lphETUVefEuOR1DQF1cBRT/MR0zal2pz1Taxnr9hmcqaVl5RHEsFy0kz/ X-Received: by 10.50.41.66 with SMTP id d2mr26776490igl.28.1408713501945; Fri, 22 Aug 2014 06:18:21 -0700 (PDT) Received: from hash ([2001:470:1d:6db:230:48ff:fe9d:9c89]) by mx.google.com with ESMTPSA id dx6sm37418607igb.15.2014.08.22.06.18.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 22 Aug 2014 06:18:21 -0700 (PDT) Received: from bob by hash with local (Exim 4.80) (envelope-from ) id 1XKojG-00024h-Dr; Fri, 22 Aug 2014 09:18:06 -0400 From: Bob Copeland To: linville@tuxdriver.com, mickflemm@gmail.com Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org, Bob Copeland Subject: [PATCH 3/3] ath5k: remove redundant null check before kfree() Date: Fri, 22 Aug 2014 09:18:02 -0400 Message-Id: <1408713482-7917-3-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1408713482-7917-1-git-send-email-me@bobcopeland.com> References: <1408713482-7917-1-git-send-email-me@bobcopeland.com> 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.6 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 kfree() null-checks its argument. Found by smatch. Signed-off-by: Bob Copeland --- drivers/net/wireless/ath/ath5k/attach.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c index 7106547..66b6366 100644 --- a/drivers/net/wireless/ath/ath5k/attach.c +++ b/drivers/net/wireless/ath/ath5k/attach.c @@ -351,8 +351,7 @@ void ath5k_hw_deinit(struct ath5k_hw *ah) { __set_bit(ATH_STAT_INVALID, ah->status); - if (ah->ah_rf_banks != NULL) - kfree(ah->ah_rf_banks); + kfree(ah->ah_rf_banks); ath5k_eeprom_detach(ah);