From patchwork Tue May 9 03:48:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 9717021 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 0958260365 for ; Tue, 9 May 2017 04:34:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F36E728068 for ; Tue, 9 May 2017 04:34:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7053282E8; Tue, 9 May 2017 04:34:01 +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=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 E6E3E28068 for ; Tue, 9 May 2017 04:34:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752334AbdEIEd6 (ORCPT ); Tue, 9 May 2017 00:33:58 -0400 Received: from gateway34.websitewelcome.com ([192.185.149.72]:39989 "EHLO gateway34.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751213AbdEIEd5 (ORCPT ); Tue, 9 May 2017 00:33:57 -0400 X-Greylist: delayed 1437 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 May 2017 00:33:57 EDT Received: from cm6.websitewelcome.com (cm6.websitewelcome.com [108.167.139.19]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 36277392178 for ; Mon, 8 May 2017 22:48:16 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cm6.websitewelcome.com with id J3oF1v00C0V9LXg013oGKZ; Mon, 08 May 2017 22:48:16 -0500 Received: from [189.152.157.2] (port=49150 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1d7w8E-000I1H-Tq; Mon, 08 May 2017 22:48:14 -0500 Date: Mon, 8 May 2017 22:48:14 -0500 From: "Gustavo A. R. Silva" To: QCA ath9k Development , Kalle Valo Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] net: wireless: ath: ath9k: remove unnecessary code Message-ID: <20170509034814.GA18034@embeddedgus> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.152.157.2 X-Exim-ID: 1d7w8E-000I1H-Tq X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.157.2]:49150 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 8 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= 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 The name of an array used by itself will always return the array's address. So this test will always evaluate as true. Addresses-Coverity-ID: 1364903 Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c index fb80ec8..5c3bc28 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.c +++ b/drivers/net/wireless/ath/ath9k/eeprom.c @@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data) if (ah->eeprom_blob) ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data); - else if (pdata && !pdata->use_eeprom && pdata->eeprom_data) + else if (pdata && !pdata->use_eeprom) ret = ath9k_hw_nvram_read_pdata(pdata, off, data); else ret = common->bus_ops->eeprom_read(common, off, data);