From patchwork Mon Sep 23 04:35:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2926061 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC9DB9F289 for ; Mon, 23 Sep 2013 04:35:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED8662052D for ; Mon, 23 Sep 2013 04:35:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C9BB120527 for ; Mon, 23 Sep 2013 04:35:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751961Ab3IWEfp (ORCPT ); Mon, 23 Sep 2013 00:35:45 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:24717 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751835Ab3IWEfo (ORCPT ); Mon, 23 Sep 2013 00:35:44 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MTK0065DA3JHRH0@mailout1.samsung.com> for linux-pci@vger.kernel.org; Mon, 23 Sep 2013 13:35:43 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.51]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 71.27.31253.F15CF325; Mon, 23 Sep 2013 13:35:43 +0900 (KST) X-AuditID: cbfee690-b7f3b6d000007a15-0f-523fc51f4803 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id F5.EA.05832.F15CF325; Mon, 23 Sep 2013 13:35:43 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MTK00N8QA3I5610@mmp1.samsung.com>; Mon, 23 Sep 2013 13:35:43 +0900 (KST) From: Jingoo Han To: 'Bjorn Helgaas' Cc: linux-pci@vger.kernel.org, 'Thomas Petazzoni' , 'Jason Cooper' , 'Jingoo Han' References: <001a01ceb366$5e9481b0$1bbd8510$%han@samsung.com> In-reply-to: Subject: [PATCH V3 3/3] PCI: mvebu: return NULL instead of ERR_PTR(ret) Date: Mon, 23 Sep 2013 13:35:42 +0900 Message-id: <001001ceb816$5d1aecc0$1750c640$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac6zZl5+kmbKEZAhToGpxpyQ271bsQAAAwJQASv2oDA= Content-language: ko x-cr-hashedpuzzle: A5vC J9Vb Nsvt OxD+ PcxM Pc04 RzUZ SI70 TjZK VU26 sHZO uz3H wcwK zzgW 1sS0 4gLk; 5; YgBoAGUAbABnAGEAYQBzAEAAZwBvAG8AZwBsAGUALgBjAG8AbQA7AGoAYQBzAG8AbgBAAGwAYQBrAGUAZABhAGUAbQBvAG4ALgBuAGUAdAA7AGoAZwAxAC4AaABhAG4AQABzAGEAbQBzAHUAbgBnAC4AYwBvAG0AOwBsAGkAbgB1AHgALQBwAGMAaQBAAHYAZwBlAHIALgBrAGUAcgBuAGUAbAAuAG8AcgBnADsAdABoAG8AbQBhAHMALgBwAGUAdABhAHoAegBvAG4AaQBAAGYAcgBlAGUALQBlAGwAZQBjAHQAcgBvAG4AcwAuAGMAbwBtAA==; Sosha1_v1; 7; {BE1BEE7F-5588-4D68-92BA-8AF2573F130B}; agBnADEALgBoAGEAbgBAAHMAYQBtAHMAdQBuAGcALgBjAG8AbQA=; Mon, 23 Sep 2013 04:35:34 GMT; WwBQAEEAVABDAEgAIABWADMAIAAzAC8AMwBdACAAUABDAEkAOgAgAG0AdgBlAGIAdQA6ACAAcgBlAHQAdQByAG4AIABOAFUATABMACAAaQBuAHMAdABlAGEAZAAgAG8AZgAgAEUAUgBSAF8AUABUAFIAKAByAGUAdAApAA== x-cr-puzzleid: {BE1BEE7F-5588-4D68-92BA-8AF2573F130B} X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHIsWRmVeSWpSXmKPExsVy+t8zY135o/ZBBlvvCVgsacqwaFxymcXi 8sJLrBZn5x1ns3j6oInJgdXjyaaLjB4LNpV6NBw4z+LRt2UVo8fnTXIBrFFcNimpOZllqUX6 dglcGWu7ljEWvOKqWNG/mLWBsYGzi5GTQ0LAROLNqcmMELaYxIV769m6GLk4hASWMUocW9HJ BFN0Y8tTqMQiRonJbROZIZxfjBLfTj5hA6liE1CT+PLlMDuILSKgKTF7xRawbmaQUYteunYx cgA12Eo8O28PEuYU4JFY96eTGcQWFnCX2L76LVg5i4CqxMd598BsXqDyU9cfs0HYghI/Jt9j gRipJbF+53Go8fISm9e8ZQYZLyGgLvHory7EBVYSze+6GCFKRCT2vXjHCHKyhMATVoldd16y QjxmKjFt0gMmiMRHdom7L7ewQRwhIPFt8iEWiKGyEpsOMEPUS0ocXHGDZQKj1CwkJ81CctIs JCfNQrJ7ASPLKkbR1ILkguKk9CITveLE3OLSvHS95PzcTYyQuJ6wg/HeAetDjMlA6ycyS4km 5wPTQl5JvKGxmZGFqYmpsZG5pRlpwkrivOot1oFCAumJJanZqakFqUXxRaU5qcWHGJk4OKUa GDsCj/55/Cr5vFwbc/s+Kd+/v7WOFvHXbWzZ80iAZ3/wX1nmn5JutwLYfGSPMAuIv97xKqWg r+ldz06G7fcnTOq+rNG/u+GZ4eaazzf+T5Q3umPT3P52yutj8qslWQ4ns6dzfznpyFNwaW2l oa3dxU72baw5PGp63Kd/xR/e/vFPzdxpfCqfIpVYijMSDbWYi4oTAafFCYQBAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNKsWRmVeSWpSXmKPExsVy+t9jAV35o/ZBBo/O8FgsacqwaFxymcXi 8sJLrBZn5x1ns3j6oInJgdXjyaaLjB4LNpV6NBw4z+LRt2UVo8fnTXIBrFENjDYZqYkpqUUK qXnJ+SmZeem2St7B8c7xpmYGhrqGlhbmSgp5ibmptkouPgG6bpk5QLuVFMoSc0qBQgGJxcVK +naYJoSGuOlawDRG6PqGBMH1GBmggYR1jBlru5YxFrziqljRv5i1gbGBs4uRk0NCwETixpan bBC2mMSFe+uBbC4OIYFFjBKT2yYyQzi/GCW+nXwCVsUmoCbx5cthdhBbREBTYvaKLUwgNrPA MkaJRS9duxg5gBpsJZ6dtwcJcwrwSKz708kMYgsLuEtsX/0WrJxFQFXi47x7YDYvUPmp64/Z IGxBiR+T77FAjNSSWL/zONR4eYnNa94yg4yXEFCXePRXF+ICK4nmd12MECUiEvtevGMEOVlC 4AmrxK47L1khHjOVmDbpAdMERpFZSFbMQrJiFpIVs5DMWsDIsopRNLUguaA4KT3XSK84Mbe4 NC9dLzk/dxMjOGk8k97BuKrB4hCjAAejEg9vZKJ9kBBrYllxZe4hRgkOZiUR3qZOoBBvSmJl VWpRfnxRaU5q8SHGZGAITGSWEk3OBya0vJJ4Q2MTMyNLIzMLIxNzc9KElcR5D7ZaBwoJpCeW pGanphakFsFsYeLglGpgnLlxpThPiqy53OK5ahUtpZNj1L/d+eiw9V5Qufu19IXcTNMr/jt+ UO6/8MCKZ/E6/wXnru+cyKbxSe2t7PvkI846TSpsd4zutu6+eSW6PLov9PqTpmtfT3lHSN7h XdJjoLjpcl3olilfHEW7lq05NrmzqmxKj+IGvktPbaPaZs+VvtArIhf3SImlOCPRUIu5qDgR AKur9UBeAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Return NULL instead of ERR_PTR(ret) in order to fix the following sparse warning: drivers/pci/host/pci-mvebu.c:744:31: warning: incorrect type in return expression (different address spaces) drivers/pci/host/pci-mvebu.c:744:31: expected void [noderef] * drivers/pci/host/pci-mvebu.c:744:31: got void * Signed-off-by: Jingoo Han Acked-by: Thomas Petazzoni Acked-by: Thomas Petazzoni --- drivers/pci/host/pci-mvebu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 0bd3ba8..fb2474f 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -741,7 +741,7 @@ static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev, ret = of_address_to_resource(np, 0, ®s); if (ret) - return ERR_PTR(ret); + return NULL; return devm_ioremap_resource(&pdev->dev, ®s); } @@ -940,10 +940,9 @@ static int mvebu_pcie_probe(struct platform_device *pdev) continue; port->base = mvebu_pcie_map_registers(pdev, child, port); - if (IS_ERR(port->base)) { + if (!port->base) { dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n", port->port, port->lane); - port->base = NULL; clk_disable_unprepare(port->clk); continue; }