From patchwork Thu Sep 3 09:05:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Xu X-Patchwork-Id: 248989 Delivered-To: patch@linaro.org Received: by 2002:a17:906:6447:0:0:0:0 with SMTP id l7csp271133ejn; Thu, 3 Sep 2020 02:09:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5uDZzfGw4BAwIGJl4ggXWUzC+UliWyJJ3DyLocXFpLfpP7t0eN+1b5zJmfwREtnv3MrSU X-Received: by 2002:a50:ba8c:: with SMTP id x12mr2088408ede.319.1599124155057; Thu, 03 Sep 2020 02:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599124155; cv=none; d=google.com; s=arc-20160816; b=Rck9BFKBvJbd1sJJoWQIrbuJvdzIy6kLKDdQ10tousHYCEaqU3oLXZyGa0YBPIlcp1 COVIjEPo2poTS1ZRrL7R5fm5C4EZe1Vjeueq9ZPD71QHUnicfBHd7YAo/sVIeifBd/3B vzLb5mGOWicxYoYeGTGHOpNvmEof82dxgWuGsCeO4dQGJiaQqkYygwkura+kN2xE5Fa0 Pv6u6sWENs7N8IvakCFPN7abEXHUSgptoSpyA0KAC9B6g6+W0RwRIRyJ/vIZi4CjefJT N+rzALQr5lYXlybeddTmwnZYecEfEs2Hnn9rLIBhYB3KGUh8YDG1dri3qObMrtjE9Veh gyFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=OYarUrbKm0OoUOHXwjwIaNrB8GbSnTyScBl73hgRe4o=; b=eV1r0vu9maBzPpRK50jlSkM+Ebdtae5ohj/TexPL9buc8NAuKdp9UxHpZOsnEbgo/J E/nEjPA0bDvF14lgIYlRMcy5emxCa1biYRkat7EIyVeOCUq50mHvQDjYS9oHLpF5/vzu qwdeVqzQxLpx6tRs6UgGKK4+wg6QrKirFlpeASNd3wa+xCtY43Hfu4+UA+rqB8sFvkzd clVkxXDhxTrmBNNSFNZSaXAz0BTXd1kAo0+hSb/91O/pxDk3EUYYmZwD4HQiP7EbqsNK wdP+KdtLmDU+tpLgP/Y3yhzox9M4FyIAMnED5nXsTfDIEUE1WSQQl3qmF0M+rb06ZZP5 3V2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr21si2225354ejc.23.2020.09.03.02.09.14; Thu, 03 Sep 2020 02:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726293AbgICJJN (ORCPT + 4 others); Thu, 3 Sep 2020 05:09:13 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10807 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726109AbgICJJM (ORCPT ); Thu, 3 Sep 2020 05:09:12 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 747EB56EFF00A9C363B0; Thu, 3 Sep 2020 17:09:09 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Thu, 3 Sep 2020 17:09:01 +0800 From: Wei Xu To: , CC: , , , , , , , , , , , , Jingoo Han , Rob Herring , Kukjin Kim , Krzysztof Kozlowski , , , , Subject: [PATCH] PCI: exynos: simplify with PTR_ERR_OR_ZERO Date: Thu, 3 Sep 2020 17:05:16 +0800 Message-ID: <1599123916-65530-1-git-send-email-xuwei5@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Use PTR_ERR_OR_ZERO to make the code a little bit simpler. This code was detected with the help of Coccinelle. Signed-off-by: Wei Xu --- drivers/pci/controller/dwc/pci-exynos.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.8.1 diff --git a/drivers/pci/controller/dwc/pci-exynos.c b/drivers/pci/controller/dwc/pci-exynos.c index 8d82c43..f59f027 100644 --- a/drivers/pci/controller/dwc/pci-exynos.c +++ b/drivers/pci/controller/dwc/pci-exynos.c @@ -90,10 +90,7 @@ static int exynos5440_pcie_get_mem_resources(struct platform_device *pdev, return -ENOMEM; ep->mem_res->elbi_base = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(ep->mem_res->elbi_base)) - return PTR_ERR(ep->mem_res->elbi_base); - - return 0; + return PTR_ERR_OR_ZERO(ep->mem_res->elbi_base); } static int exynos5440_pcie_get_clk_resources(struct exynos_pcie *ep)