Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3228877pxb; Mon, 16 Nov 2020 08:59:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKAkwGdBu0OtkgWEglbKvEaNiWx0FMgjIcdBRP9udJ2k9+Sf63l6Dtzso8VD2XjsTF3zRc X-Received: by 2002:aa7:c151:: with SMTP id r17mr16554433edp.216.1605545991084; Mon, 16 Nov 2020 08:59:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605545991; cv=none; d=google.com; s=arc-20160816; b=gMQhjBL5k7lRB1OhRk7Vjasdk/svhrDOdNN0VZPq8K0A/dG46/QYO89w2SDFNBqjqp QkobISMnLfNviHjf1IpkQ5GacuExbj02V6bvVx+7/a/2iPjmr8DWOw4ByRadR/JChYY/ tsFrxNIYkjNqx3VQ8uh4hkiBt/08Sggi/i636xEBjIZa9OmEkgk4yxfGOrNe+lA//pwi qLauyEcJn6KHZZbYVqEukSs9sdqJoXrSzSYCAu4OsZe9IRmVdTgvEWObpEarZzvbT9L2 O1DQnbblMdqsYsHq/vZO3gNfrn6BY9FpUeDiyZIm9jLAZPDEw5E7F4aVI0+Q0VAWzYv/ 095Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=rgqx75mWHRgXFv0CwsRMCHA+Jcb7vaejQXT/lvk4loI=; b=sFZfnAdHX8fvirBwFIdIwXtTlDhBSAL8+PV388EC5JiiAeN0VoIl7aroX9Poi5cDMQ r2iDHgdD3xhvuGKzqQj6ccraADVEk3TOOquE9YTQPYozKvSFYTNrBEjfGAb4CaP1Aqtc crab2Pm9Jg0ltB74WvtbYPv8m17lsetb5v5XFc6rDejVIlEj0i8dgTbEIjE74q1V5k+J e0+92aI7S7HZBXx98ykb5lguv5cIp/4najUQ/QnHfzTu5unt7CAOM7rx8b8LmnsK1khL muNYvltJTpyc3fqPZcm4P64ugg/OVfVUKSUtVO/KAcAV+cWeyEmbf5B6009sFqZ4IUI9 VVDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="R4iHLOz/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id br9si11893465ejb.115.2020.11.16.08.59.27; Mon, 16 Nov 2020 08:59:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="R4iHLOz/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732318AbgKPQ4M (ORCPT + 99 others); Mon, 16 Nov 2020 11:56:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729841AbgKPQ4L (ORCPT ); Mon, 16 Nov 2020 11:56:11 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE3D5C0613CF; Mon, 16 Nov 2020 08:56:10 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id m6so2258630wrg.7; Mon, 16 Nov 2020 08:56:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=rgqx75mWHRgXFv0CwsRMCHA+Jcb7vaejQXT/lvk4loI=; b=R4iHLOz/BtXQffuiBz0GFIa0q6Lg5X2oAtQfBOGQDXzIe7Mk9aRwyl4IuT2aiNOTER uCgxNsY75kHGqbARXkCeKliXExFRpdBRzqZa4znrXAPHSI8Q08RQibOiZMCFaBx4+WZZ vCqpygSaD+QLP0HOcqTAQWgXVV/tyPRdk4VJtt0GNJhh6g3/SfLMdGpl7XggqqWYWA6N ZGtawuIpnNbLiWV0LJguJir7mP5dYJxNB3gVDbMzYJII9YfOWHD0SfsMcu6OMwY02wES U7dx4hXvHUEa9XDUjv0lwv/DQXHrMlE5mc7YPavRRfP9PHiN5yjotVvZ9VQah3U357aQ hDJQ== 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=rgqx75mWHRgXFv0CwsRMCHA+Jcb7vaejQXT/lvk4loI=; b=PRPP8OctNcP1Sv5F9oHUZZwND5F38cejGLB7auF5EGS1ZeGd2wxV9WixVQeScn9Jd3 uUGmBxHfTicbHtelqEPSzlTHxD69oUyi0XsCyEjfFiGCFR+XOurOeAcfPyxG2qG+fXkm lyCKJ4NKLg6MhEEDIFRR0fSiJyDHX+WkcOQl1Dt2WSfMXsnuQ35iLaE2BpoUb2H1O8R4 ik1yxQ2ta4ENfrjuwji9X8df5hMVK45Yjk30tlWwQrtwGf8zH4DThXcdSe3uT5DCqjDD zALwzYczqjjGOBTkEs1VBF4vYneXklYic6UiS/+7XfpUzB4bl7Od7O+Zp97X81gVYjzs gzDA== X-Gm-Message-State: AOAM530pa+sHvVkujolv5LpiFtZ82KIVQV4Brnskt+87tktdF/+UnM6J rvvGSUw5xoAAZ0RHKxCj0PK0HWcgtoIjow== X-Received: by 2002:adf:ea91:: with SMTP id s17mr20593129wrm.349.1605545769524; Mon, 16 Nov 2020 08:56:09 -0800 (PST) Received: from localhost.localdomain (host-92-5-241-147.as43234.net. [92.5.241.147]) by smtp.gmail.com with ESMTPSA id d2sm19314593wra.73.2020.11.16.08.56.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Nov 2020 08:56:09 -0800 (PST) From: Sudip Mukherjee To: Thierry Reding , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Jonathan Hunter Cc: linux-kernel@vger.kernel.org, linux-safety@lists.elisa.tech, linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org, Sudip Mukherjee Subject: [PATCH] PCI: tegra: Use PTR_ERR_OR_ZERO Date: Mon, 16 Nov 2020 16:54:07 +0000 Message-Id: <20201116165407.8050-1-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Coccinelle suggested using PTR_ERR_OR_ZERO() and looking at the code, we can use PTR_ERR_OR_ZERO() instead of checking IS_ERR() and then doing 'return 0'. Signed-off-by: Sudip Mukherjee --- drivers/pci/controller/pci-tegra.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c index 8fcabed7c6a6..4c52b2d58645 100644 --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -1308,10 +1308,8 @@ 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.11.0