From patchwork Thu Sep 20 21:26:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10608785 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-2.web.codeaurora.org (Postfix) with ESMTP id 8C014157B for ; Thu, 20 Sep 2018 21:27:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B4782DFA3 for ; Thu, 20 Sep 2018 21:27:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F1C52DFBB; Thu, 20 Sep 2018 21:27:19 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 1B56B2DFA3 for ; Thu, 20 Sep 2018 21:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388596AbeIUDMo (ORCPT ); Thu, 20 Sep 2018 23:12:44 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:35264 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727252AbeIUDMn (ORCPT ); Thu, 20 Sep 2018 23:12:43 -0400 Received: by mail-wm1-f68.google.com with SMTP id o18-v6so1034365wmc.0; Thu, 20 Sep 2018 14:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tVgVxlfs9vyZxkaXlAYhWNe23avDgzXcpA7xki/Hwcc=; b=u0nJOx2iFV2gqRt6aHZJPzxnX7QIMvoqL5+G+yD+lmVDpNGg0JAk3wOyNy01tTyVmM COcbO4OImsMnuA8B4rTfEwujF18IxpnTnGM3jAvMjANp/qbb9GiMe0o81dxd6L/HisbY txHk+sRAThu4VlJDWo/qZAHhjX23X7Wj36p0qZrn3SoXB5U5uHp2qpB4McHsla6hIZPC anVo4BKMf3JvoJ4+2KfpOBKx3H39MA1pzKQsPzpZ8D5lvljzFdckWeK619IUAKbtW+SD lgrf4qSXeM/31QZFXhkICZnsgRBYD61u45A/XDrTyLk8oXJ53e4ikSWw8gYlorvvigml 4AmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tVgVxlfs9vyZxkaXlAYhWNe23avDgzXcpA7xki/Hwcc=; b=ZyUazKdcoPKHEEgQngNROxZk0sWzROKuzK44JlmHkPSmvh77SHyUAl+O8zv4hCBqUQ xshhocmd+BT+Dqf41RLJTx3HVgP7XZJm9feSN5MKYfaglg2PapubGIy+yFr7FEY1Y7EC ocqAPL6OAENTepszx3YCWHLd6tGG8l7PA5fQA4xuyKqZaClVhdGuQITWDKcv8O42BFOD P/FOm6EnqzY/T6M9k3uVm2j8K4j3if6aonAfn4TJDvHMJt3Et/IbvkdcLDhqbPdYskIo vTNy3bf40EmMrN47C4a1JsZw5bjIieRNsxifGto1IduQOp6dDy8qGQ62EJZxjHm0WFO+ ef7Q== X-Gm-Message-State: APzg51A3HwQ+GJhRcbEhAGgtNsT6R6gjxXcVlkXPil4FfokD3NBz5MGY BzqTUb49FzYCsr4t7MCXR/o= X-Google-Smtp-Source: ACcGV61A82vlDNqkpaILXHB15MhgygtR53OPwyX8RnyRCgVfMNtNXPG/OXX29+NY1w0f1ZV+FsPBUA== X-Received: by 2002:a1c:87ca:: with SMTP id j193-v6mr4674673wmd.76.1537478832059; Thu, 20 Sep 2018 14:27:12 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id 198-v6sm4945313wmm.0.2018.09.20.14.27.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 14:27:11 -0700 (PDT) From: Nathan Chancellor To: Aditya Shankar , Ganesh Krishna , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH] staging: wilc1000: Remove unnecessary pointer check Date: Thu, 20 Sep 2018 14:26:49 -0700 Message-Id: <20180920212648.25181-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 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 Clang warns that the address of a pointer will always evaluated as true in a boolean context: drivers/staging/wilc1000/linux_wlan.c:267:20: warning: address of 'vif->ndev->dev' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!(&vif->ndev->dev)) ~ ~~~~~~~~~~~^~~ 1 warning generated. Since this statement always evaluates to false due to the logical not, remove it. Link: https://github.com/ClangBuiltLinux/linux/issues/121 Signed-off-by: Nathan Chancellor Reviewed-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 49afda669393..323593440e40 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -264,9 +264,6 @@ static int wilc_wlan_get_firmware(struct net_device *dev) netdev_info(dev, "loading firmware %s\n", firmware); - if (!(&vif->ndev->dev)) - goto fail; - if (request_firmware(&wilc_firmware, firmware, wilc->dev) != 0) { netdev_err(dev, "%s - firmware not available\n", firmware); ret = -1;