Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753791AbdH2NjP (ORCPT ); Tue, 29 Aug 2017 09:39:15 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36180 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310AbdH2NjN (ORCPT ); Tue, 29 Aug 2017 09:39:13 -0400 X-Google-Smtp-Source: ADKCNb4SltfCJEK0hQXxjDd6IhJdEvHo3rGqbd3F53uIDcz4ngIhIersbMmRXmKqYZgxhOjPiZ1qKw== From: Himanshu Jha To: thierry.reding@gmail.com Cc: bhelgaas@google.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Himanshu Jha Subject: [PATCH] PCI: tegra: Use PTR_ERR_OR_ZERO Date: Tue, 29 Aug 2017 19:09:00 +0530 Message-Id: <1504013940-16304-1-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 772 Lines: 25 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha --- drivers/pci/host/pci-tegra.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 9c40da5..90cda5b 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -1156,10 +1156,7 @@ static int tegra_pcie_resets_get(struct tegra_pcie *pcie) return PTR_ERR(pcie->afi_rst); pcie->pcie_xrst = devm_reset_control_get_exclusive(dev, "pcie_x"); - if (IS_ERR(pcie->pcie_xrst)) - return PTR_ERR(pcie->pcie_xrst); - - return 0; + return PTR_ERR_OR_ZERO(pcie->pcie_xrst); } static int tegra_pcie_phys_get_legacy(struct tegra_pcie *pcie) -- 2.7.4