From patchwork Mon Sep 23 06:31:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2926241 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0BACCBFF05 for ; Mon, 23 Sep 2013 06:31:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3742D2012D for ; Mon, 23 Sep 2013 06:31:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36877200EA for ; Mon, 23 Sep 2013 06:31:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753168Ab3IWGb1 (ORCPT ); Mon, 23 Sep 2013 02:31:27 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:15425 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753156Ab3IWGb0 (ORCPT ); Mon, 23 Sep 2013 02:31:26 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MTK00CGPFGDJB40@mailout4.samsung.com> for linux-pci@vger.kernel.org; Mon, 23 Sep 2013 15:31:25 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.48]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 3C.50.20109.D30EF325; Mon, 23 Sep 2013 15:31:25 +0900 (KST) X-AuditID: cbfee68f-b7f1e6d000004e8d-da-523fe03deb3e Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 0A.88.05832.D30EF325; Mon, 23 Sep 2013 15:31:25 +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 <0MTK00NZUFGC56G1@mmp1.samsung.com>; Mon, 23 Sep 2013 15:31:24 +0900 (KST) From: Jingoo Han To: 'Bjorn Helgaas' Cc: linux-pci@vger.kernel.org, 'Thomas Petazzoni' , 'Jason Cooper' , 'Jingoo Han' References: <000c01ceb816$19f0dd10$4dd29730$%han@samsung.com> In-reply-to: <000c01ceb816$19f0dd10$4dd29730$%han@samsung.com> Subject: [PATCH V3 3/3] PCI: mvebu: return NULL instead of ERR_PTR(ret) Date: Mon, 23 Sep 2013 15:31:24 +0900 Message-id: <000101ceb826$8695b7f0$93c127d0$%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: Ac64FhnBjRak8XOoQvGUUoggPRoNbAAEEZiA Content-language: ko x-cr-hashedpuzzle: DpfA FRMd P5c2 Rkgk SLRk Uzkh dFWR eayt e1X7 kLgK lTH+ m/rp sZw7 1ALw 3gVU 4bV7; 5; YgBoAGUAbABnAGEAYQBzAEAAZwBvAG8AZwBsAGUALgBjAG8AbQA7AGoAYQBzAG8AbgBAAGwAYQBrAGUAZABhAGUAbQBvAG4ALgBuAGUAdAA7AGoAZwAxAC4AaABhAG4AQABzAGEAbQBzAHUAbgBnAC4AYwBvAG0AOwBsAGkAbgB1AHgALQBwAGMAaQBAAHYAZwBlAHIALgBrAGUAcgBuAGUAbAAuAG8AcgBnADsAdABoAG8AbQBhAHMALgBwAGUAdABhAHoAegBvAG4AaQBAAGYAcgBlAGUALQBlAGwAZQBjAHQAcgBvAG4AcwAuAGMAbwBtAA==; Sosha1_v1; 7; {050AA4D0-39AF-4AD3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000000@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 --- 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; }