Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1204353imm; Wed, 11 Jul 2018 20:05:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfUWdo1oJ0HRHvmZmpqlhoGU7sY1Gv/2f4EwaFXwmPNVjFkqlFZ4KzjZW4Fyg2vN35pJNlc X-Received: by 2002:a63:ec14:: with SMTP id j20-v6mr461936pgh.28.1531364708466; Wed, 11 Jul 2018 20:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531364708; cv=none; d=google.com; s=arc-20160816; b=kxDIQmPvT5kNF1hZOWd/ZwGcwngsdVqkI31/tBmPrh9HGScljyZUWZ3BZ85GcywjfQ fqGBbzdQuadzQwEPOGW1J9NJpeZ/z+erW0KjrYFbdqSInrsXxf81pLCjz7SOSy3IFoqa wXEKorb1eGhdYjLpNlmr7y0EQ+V52dUgcdTnN9ODCZTbQe3a62zMmILXkAaD30DuI4Bw K85jm8JJMvkDSoPYkba6x38pBRWA8tLLHRyad1SkaqU1Q5CDFTvXmsZWWtgaAgm+/Fgc 3LbTtt+MyV+IqwbMNN0utKytCbCifx/i8jwe/FpE0reYtw85TijsCPy0orwdVnws1Ndi 282Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=HhQQ4OLepj/h6ByaKBq/8o4BF7KhjnOj6T1atY87ISw=; b=KtOB4PCXMignfdLoahSiuOnLzCKSO7ireNd3MdF8T2iWYeqRozzW0LNuDK/1vPitKS dt3+5jBBzPyVh8KbC76+kBdTYBWJSt9ibMMcoQAgtDbwJ1rGwe5Wq2+YYqBjVh7oucsG Hz7nEXOEAZXrbD1ShY9+SHrx0MeFW6SeoDoiCBVRumy7+DrPU9mVkwVnXWnS9sR8uuyJ yCeSqLGTRAuYOJaIKTU9eUjU6ga6qpP9FC7vmzRjUVwbRrNqyALPPYJEu5lg4rqwWXiL lsa1i3nOG05r0cGtFOSK7CLyW7qQAmWW2qZkA6t6w+MqxP3g/Mu6i6iEMpqHfmzAVWFM jnfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f59-v6si20913655plf.500.2018.07.11.20.04.53; Wed, 11 Jul 2018 20:05:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390850AbeGKXhr (ORCPT + 99 others); Wed, 11 Jul 2018 19:37:47 -0400 Received: from mga12.intel.com ([192.55.52.136]:10319 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387997AbeGKXhr (ORCPT ); Wed, 11 Jul 2018 19:37:47 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 16:31:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,339,1526367600"; d="scan'208";a="71604116" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga001.fm.intel.com with ESMTP; 11 Jul 2018 16:31:05 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1fdOZc-0003Zb-Q7; Thu, 12 Jul 2018 07:31:04 +0800 Date: Thu, 12 Jul 2018 07:30:41 +0800 From: kbuild test robot To: Shawn Lin Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Thierry Reding , Lorenzo Pieralisi , Jonathan Hunter , linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH] PCI: fix ptr_ret.cocci warnings Message-ID: <20180711233041.GA39597@lkp-sbx04> References: <201807120738.oIXXb65q%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807120738.oIXXb65q%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: lkp@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot drivers/pci/controller/pci-tegra.c:1132:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 6e0832fa432e ("PCI: Collect all native drivers under drivers/pci/controller/") CC: Shawn Lin Signed-off-by: kbuild test robot --- pci-tegra.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -1129,10 +1129,7 @@ static int tegra_pcie_resets_get(struct 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)