Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp965464ybi; Wed, 3 Jul 2019 07:18:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/cZx0Vq+MNteiRuUDGRG4wV+YqjhPRbFB/Q3kDfN5wAaL5VYfdY7/r1vC9rv2UPhY+Ier X-Received: by 2002:a17:90a:2648:: with SMTP id l66mr12933411pje.65.1562163508690; Wed, 03 Jul 2019 07:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562163508; cv=none; d=google.com; s=arc-20160816; b=z+a7MdpH/ZQ19+QA+iTbCIhK4WR9tVLtxLsc2xY+oMO5vYevfNqwfchjIXZ9bGj4MC K0/+0oYEwF9yqccXL1+wPgx4WFeGisg59n6p1KwgJLLaYQAkQBNA5CYRbym4vleQvCd6 S7TfekQ7ieUJyrFBWZN++oFwdkqypXTV7SyxAJ8rmtQ9DnGic78NQGJKJYz9J2i4W6pT 2mD4HVQBL0QPofMbuiK22s9QL8USYU1SUjdACpwH++Hauiat9M5Pl2yG5iThBIfFzWtM UXpOey37h2cQhEbJG46pEt77Ed5tu2pZKCEXBcHqab2kLP69QMb8jNw4Pq0r0WKYLqvI gw2Q== 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; bh=9MNsCIO4ygC1JuR0ztvOqgK0igcUUmAHHcefWKVH0XM=; b=jGS1/3Jjmjb2PcgkR/SfHglulUq46DKzHe1++BnTN0BMUL+4JnEC6E5DGctdcuscy1 +tF2rKQV++mTzxHr+r2wqHvbKBBN8aHstnKdYuTuEsQuSmUnKaXkqpzbRcO+azHh6rbm y3iofpP9z56KF+Xhw24HytonIjBC7aQTNm3TohFnRdPw+njKao5D4MmGjJRGCxU09JMh ZE72HONkaXkNqMwkqWcr7zLYWMOrUbSq/ocgvYy8NQL17F86lPFVMQWG6mNEvHv7pg8r DuAnKvQlrXkf01J31sTvDepz5mIU8gviDAD+IFCOE3bLcV+jyx3fTol6HsdTXEGgl5CS Muug== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si2351082pls.201.2019.07.03.07.18.12; Wed, 03 Jul 2019 07:18:28 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727186AbfGCORU (ORCPT + 99 others); Wed, 3 Jul 2019 10:17:20 -0400 Received: from foss.arm.com ([217.140.110.172]:49192 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726581AbfGCORU (ORCPT ); Wed, 3 Jul 2019 10:17:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3A2DD2B; Wed, 3 Jul 2019 07:17:20 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (unknown [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 363A63F718; Wed, 3 Jul 2019 07:17:18 -0700 (PDT) Date: Wed, 3 Jul 2019 15:17:15 +0100 From: Lorenzo Pieralisi To: "Z.q. Hou" Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , Leo Li , "catalin.marinas@arm.com" , "will.deacon@arm.com" , Mingkai Hu , "M.h. Lian" , Xiaowei Bao Subject: Re: [PATCHv5 03/20] PCI: mobiveil: Correct the returned error number Message-ID: <20190703141715.GB26804@e121166-lin.cambridge.arm.com> References: <20190412083635.33626-1-Zhiqiang.Hou@nxp.com> <20190412083635.33626-4-Zhiqiang.Hou@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190412083635.33626-4-Zhiqiang.Hou@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 08:35:30AM +0000, Z.q. Hou wrote: > From: Hou Zhiqiang > > This patch corrects the returned error number by convention, > and removes an unnecessary error check. Two distinct changes, two patches, please split and repost. Lorenzo > Signed-off-by: Hou Zhiqiang > Reviewed-by: Minghuan Lian > Reviewed-by: Subrahmanya Lingappa > --- > V5: > - Corrected and retouched the subject and changelog. > > drivers/pci/controller/pcie-mobiveil.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c > index b87471f08a40..563210e731d3 100644 > --- a/drivers/pci/controller/pcie-mobiveil.c > +++ b/drivers/pci/controller/pcie-mobiveil.c > @@ -819,7 +819,7 @@ static int mobiveil_pcie_init_irq_domain(struct mobiveil_pcie *pcie) > > if (!pcie->intx_domain) { > dev_err(dev, "Failed to get a INTx IRQ domain\n"); > - return -ENODEV; > + return -ENOMEM; > } > > raw_spin_lock_init(&pcie->intx_mask_lock); > @@ -845,11 +845,9 @@ static int mobiveil_pcie_probe(struct platform_device *pdev) > /* allocate the PCIe port */ > bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie)); > if (!bridge) > - return -ENODEV; > + return -ENOMEM; > > pcie = pci_host_bridge_priv(bridge); > - if (!pcie) > - return -ENOMEM; > > pcie->pdev = pdev; > > @@ -866,7 +864,7 @@ static int mobiveil_pcie_probe(struct platform_device *pdev) > &pcie->resources, &iobase); > if (ret) { > dev_err(dev, "Getting bridge resources failed\n"); > - return -ENOMEM; > + return ret; > } > > /* > -- > 2.17.1 >