From patchwork Mon Mar 11 09:30:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Z.Q. Hou" X-Patchwork-Id: 10847031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4AEC17DF for ; Mon, 11 Mar 2019 09:30:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB11228E81 for ; Mon, 11 Mar 2019 09:30:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B92A728FBD; Mon, 11 Mar 2019 09:30:51 +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=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 46B1928E81 for ; Mon, 11 Mar 2019 09:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x1zEzjfT/Y4xua8jCIOoWIQTGE1cyD1UykXxeZZkdFY=; b=nTYf5dxP3n4n9r 2CrMr+KXqsAeCNhLB9qvCfZjwcJjJU4mmRAo2JRFmW6/AnIyaIx/LDcZlnN+3q0uk96bmKagMr1hI hkEF1ypQLn71Lkg6NmCONPo10MZWvyWY/WiQr+pPNyPLG4w6/nI5uP+c+nxbbsipOUHWIe174l6fl p0fReyj0L65IPkiCCuKmiESIlRPOrr+lq2Zz1xxRS3bx8PPdwxjdLZiUHMAW4ls5Lt4SmwVt2a+jU QMCNjrWWJ9bzDSFZvhglWa9t1UTH0J49+zUFyJwc6AUX+CzZ6aavDMUYehwIeyJPevh+8vy73MAgA DLwYA8E4QcaODB9Q1GcA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3HGj-0000iO-Fc; Mon, 11 Mar 2019 09:30:49 +0000 Received: from mail-he1eur01on0629.outbound.protection.outlook.com ([2a01:111:f400:fe1e::629] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3HGM-0008Px-QW for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2019 09:30:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QNCN4livbs1wo+1uLQfsBQB2e+/P+52q+z6t6VPGPtc=; b=Jcp/n/EzRaghXYfrZLxVTTvgiVbi/sT64BNNDLoaJo6tUViuoweyoc5I/dC+4aR+EwoOhxQvhjZVeAzkc5V6wVXcHl5mb2gQoiEtYqDQ9CPc3S0E/po8veV0rig+DHESoQ5J59cATwbYXKp1YLdh+n1HH0DUoQXNG4qC2vZrZfs= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB5592.eurprd04.prod.outlook.com (20.178.87.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Mon, 11 Mar 2019 09:30:20 +0000 Received: from AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7]) by AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7%2]) with mapi id 15.20.1686.021; Mon, 11 Mar 2019 09:30:20 +0000 From: "Z.q. Hou" To: "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 , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" Subject: [PATCHv4 03/28] PCI: mobiveil: correct the returned error number Thread-Topic: [PATCHv4 03/28] PCI: mobiveil: correct the returned error number Thread-Index: AQHU1+0LmAHw3KdU9kO+wVi9R8LChg== Date: Mon, 11 Mar 2019 09:30:20 +0000 Message-ID: <20190311093130.7209-4-Zhiqiang.Hou@nxp.com> References: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0015.apcprd03.prod.outlook.com (2603:1096:203:2e::27) To AM6PR04MB5781.eurprd04.prod.outlook.com (2603:10a6:20b:ad::19) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 35201a16-ed14-4bb7-99df-08d6a6042dd2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR04MB5592; x-ms-traffictypediagnostic: AM6PR04MB5592: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; AM6PR04MB5592; 23:ypj/CEkDDPDp/Yw8d2s72DM8FNHrvNO2X1uH+yH?= =?iso-8859-1?q?xweAf+QATyV8xIi?= =?iso-8859-1?q?+TGdCu5qn+Q8Cn53w6mLalXhWGMu9CkitAa0cAQCTtWbsjViO9pHuMT5Fl5x?= =?iso-8859-1?q?ykCvn3Pg6uC07qxLyKWFm3zMi3rYLC8cSfH/5aQCFxx+EgcWpBMJDeu4kbea?= =?iso-8859-1?q?fe8rGl6lgJYKatdEjs9/CFBiieS4M+YJdeIkhlCt16Bn+aPLpHd/wAUQ6Uj6?= =?iso-8859-1?q?pRtxzSpWzhygKIBrnoAr6brlQnfDZRb7EpCzRRJrjYSYTvY7cHfJFDekZ+YB?= =?iso-8859-1?q?hGQOgLDX+hShqJfhbSI8BSAsK+PurEFur87JkrRHKLWOjCHm6yWdZXVo+/BO?= =?iso-8859-1?q?xaCNwhDjpMPCjfcqIKwVzgzZ/0AE5+yNqN3BJPd6vmxAvkcnC7sFGSg6yLbc?= =?iso-8859-1?q?u4KrEk/UWRlPp6/bQoptUAobYDdBP9NN7s3iIdhix/flsRc5eFDrScjEtsD1?= =?iso-8859-1?q?styWBrF5EoJqTeF4P1UGD0XXucRWWoR5UH2B7LUBEx2C0BjwZ0OO6JdA6+9m?= =?iso-8859-1?q?uUCpRcCRFYNWqu9fiGvu8fd5Mz6TEk1McK0ShRzjWDwyT0PxGGNIcRfoXmv/?= =?iso-8859-1?q?i+VsP/kvpCSIjjckC4e0gQPO+d13VR2W6z84Ypwr75Vl2fiyFp9+syYvq+iO?= =?iso-8859-1?q?00+574fXSkwTeIQRPvKcUnweok/yP908O3bGTgYvHGspz9bO8JYgYD66Pw90?= =?iso-8859-1?q?afv/y3YiuhZgT8wBbtf7B+9yKtnoPYjUejOmPQyGscDPmmgFOAJmbmYkFjYF?= =?iso-8859-1?q?77J+cQkGyabDnavvLXcbznImEq21ebN8g+6d+9jSjZjm5tqxU7bdLwfscm0q?= =?iso-8859-1?q?+hcVndn8PnMb8EzFotcfgguNKscnmPGRKP+7HkJKFYHhwgiPizbDRwaMBIkR?= =?iso-8859-1?q?KeXtIUdkEE0xDBH4XFA2kE7iDddxrcKbu0YMpu3x3729s7BURE3tri7wql/Z?= =?iso-8859-1?q?FuVholQx03stVVunjTrEouuLLLiiF+K9EdTsj8LGLVvobLjNzf5AsToCJb7l?= =?iso-8859-1?q?vgKH1S4x/WStYQx9oobkNjcDgdDa2SbtIy8BT9evL1QXQPb8qw61MFEJ5E/M?= =?iso-8859-1?q?fuA3BW+J7bBRqoyB4RBiiotS/IkCudCD6nAk3oXdLGX4Z6E8rKI+NoUDy9Cx?= =?iso-8859-1?q?3ohpactbQASSpMeJdhxcZsWjlgsHut7Moj2Ap+sVLupcBwOChNBJM192JUv1?= =?iso-8859-1?q?eajmlm9MuenkgzRT0YlCTdU1RglzqUmZETy3LjGufm3KoqoGC+AdTPZF2fSB?= =?iso-8859-1?q?brvichEMeKZY5k8OlSwXVgBpX6qutKQcjuT3vCv6lnm3HNJzjJJWfofXvQ4Y?= =?iso-8859-1?q?0bQJmj+lIZaeGAKDZOBM2U/sAp7LC5?= x-microsoft-antispam-prvs: x-forefront-prvs: 09730BD177 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(396003)(376002)(136003)(39860400002)(199004)(189003)(5660300002)(4326008)(2201001)(8676002)(478600001)(81166006)(81156014)(14454004)(86362001)(8936002)(50226002)(7416002)(14444005)(256004)(1076003)(71200400001)(71190400001)(2616005)(476003)(486006)(11346002)(446003)(186003)(305945005)(7736002)(97736004)(68736007)(66066001)(36756003)(6486002)(105586002)(106356001)(6436002)(6512007)(110136005)(76176011)(54906003)(52116002)(99286004)(26005)(386003)(6506007)(3846002)(316002)(6116002)(102836004)(6346003)(25786009)(53936002)(2906002)(2501003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB5592; H:AM6PR04MB5781.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 0Ixj8ln1ybbHp9zth2qAdTJ9Xd8HjnET8gIgiabTl26yhqW7gCJsT2vqXq1SmCGHLhKqNiO49pz8SbkmIzHxD0WaiHOOfYpnIFoMQCEwiWoNxdx83zIzNM1/wIhWquGp3qYuwOi5Py6EBFT5icbUvnRL9wM0/ns86TCJqlcibTwZxzfiEp4n4QcgwCkJ56rLkaMbkdqXR8xeC2U54zMzHRDMv6qzMf3t6ePYLl7WXWDBhGqey5iBSKfpG+FfCYpUWmbmUSP/kjKaR7rymPiZW5myHiyJSuUSBjozHyKwXznWhnbA0MEhkqO8pzOTCmQo8E7rFJUlN4kstF/pNNKAzdy0IOFDT/d9jFTqZ2U9+mgFRrX/N/pgx5rQ/OqapIB+blKXJ2Of5iKQ7K9iDQpxcWi8AzGwqAMV4+z9LsQq82Q= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35201a16-ed14-4bb7-99df-08d6a6042dd2 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2019 09:30:20.1332 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB5592 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_023027_474302_377397F7 X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "M.h. Lian" , "Z.q. Hou" , Xiaowei Bao , Mingkai Hu Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hou Zhiqiang This patch corrected the returned error number by convention, and removed a unnecessary error check. Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V4: - no change 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; } /*