From patchwork Sun Jul 16 21:16:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9843709 X-Patchwork-Delegate: bhelgaas@google.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 02C9F6037F for ; Sun, 16 Jul 2017 21:16:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 078A12625B for ; Sun, 16 Jul 2017 21:16:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F086026861; Sun, 16 Jul 2017 21:16:36 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 812B62625B for ; Sun, 16 Jul 2017 21:16:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751245AbdGPVQf (ORCPT ); Sun, 16 Jul 2017 17:16:35 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:33313 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751244AbdGPVQf (ORCPT ); Sun, 16 Jul 2017 17:16:35 -0400 Received: by mail-qk0-f196.google.com with SMTP id a66so17589497qkb.0 for ; Sun, 16 Jul 2017 14:16:34 -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; bh=SL7xjfibInzCp+n9WKpXYlTg7aPcTp3Q8b/DdPBEof4=; b=nF9wP4NpQweFGLVHK/Xkx6SltUu0Gd22rHtiU7L40iDcQc4UKO0u8iojvNxh8KNlAe i6ckmBHbTelVRyXAmpT4RtyCb0myg3uSfd7b/ApEkLTbis4zycJgwxd6Ojwj0fWG1Kpw ed2CUfmTeE+Y/W6crS3b2rwjQ1zeMma2mInmxBH8TLUEa7IlxK+1hHY63dP1DWsvS3zU t4ST/NR2h1b4+ylqzZQBVRLWZC+P80Fh1KTqPpyoc4iFvwSIggXeTzuvTbmLQC5GnJMF XnEsfuodnA6jDKXrcJstuc4LgqzLD6g937ELxdmaPTHI7dO3HWSksGeIya1/7Z3XFVNN 7cQA== 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; bh=SL7xjfibInzCp+n9WKpXYlTg7aPcTp3Q8b/DdPBEof4=; b=lbWaVoNeK/DMv/o0CE2htIaxhQuCXwNoqJkWbPXotv6/unLT5X5UzpbDizomBUpctE 6lSL58nnYi90ei/Orn//Oe+zRzy2U39tYEbx2ANl0ACl4nhno9QO49MNMgpdNhSObHcH VOtYfMM4BcrPTsHjE19JMqdSLw5j5bJCi3cohTe62bnp7aetRsonBbbbYkwgql3cnasD 4zEvPC0itMqRkzauQrsfmJIfSeiHm4fTwc1v7kmx+8jeTTJr3A+L866yUCpZDJ1oeQUX 2zyFSPx7iegZ0wKuhFsEfVDapOtDsrg8d/HUypmouB232fcr21npMPIEB+MYAW0cwBf5 ELjw== X-Gm-Message-State: AIVw112AWAjg3Uk7xlx2cF8u5B5ifEkKPeURaKfff/Vbnm3DX+XJekRp Y+fIwpeto1RiXg== X-Received: by 10.55.12.4 with SMTP id 4mr23426260qkm.151.1500239794481; Sun, 16 Jul 2017 14:16:34 -0700 (PDT) Received: from localhost.localdomain ([187.180.181.24]) by smtp.gmail.com with ESMTPSA id f16sm12744502qte.18.2017.07.16.14.16.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Jul 2017 14:16:34 -0700 (PDT) From: Fabio Estevam To: bhelgaas@google.com Cc: thomas.petazzoni@free-electrons.com, jason@lakedaemon.net, linux-pci@vger.kernel.org, Fabio Estevam Subject: [PATCH] PCI: mvebu: Remove unneeded gpiod NULL check Date: Sun, 16 Jul 2017 18:16:13 -0300 Message-Id: <1500239773-15632-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver. Signed-off-by: Fabio Estevam Acked-by: Thomas Petazzoni --- drivers/pci/host/pci-mvebu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index f353a6e..fa227d8 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -1186,8 +1186,7 @@ static int mvebu_pcie_powerup(struct mvebu_pcie_port *port) */ static void mvebu_pcie_powerdown(struct mvebu_pcie_port *port) { - if (port->reset_gpio) - gpiod_set_value_cansleep(port->reset_gpio, 1); + gpiod_set_value_cansleep(port->reset_gpio, 1); clk_disable_unprepare(port->clk); }