Received: by 10.192.165.156 with SMTP id m28csp1255076imm; Wed, 18 Apr 2018 06:51:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx49KCEfKhxPgSuktvWiGhuKd1vludJDTEW00/DaaecM9bnWiQAnrTIvgYkoiFZ6H+izDw0SV X-Received: by 10.99.160.106 with SMTP id u42mr1750488pgn.389.1524059485733; Wed, 18 Apr 2018 06:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524059485; cv=none; d=google.com; s=arc-20160816; b=ycukJbuPuCptA1yAPkeqf5hu8mOtAEb4GxmufHf6QiqurgvEFhn2n4YhltBq1tY1ET bRxU+MHp7oEIapGYhQIkzOzBAkx4JIC8QejNmW7ryHLOIN3CrqEfUhT+opgi8NhMv4Qq 6YEj5nr8oxbL3aLw1hKtjIaNY3Ij0RDavf9iDUkmfRiI6NpoEtiA3LoADq2cavySAXfv ubi9HFCWmo/ml1i1vXHU/pH78GdWrfFOCKXrWFh83AlqPa6Hfz/n6ao+4mj3wa9Y7fj9 U3CZPaRvv0JadIUyfDldq/PUT59fsRu64ezSOnerSwt+P7fGZKuTMxP2NCc1/Z1h6gJZ nzqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:arc-authentication-results; bh=2JtlQn/e8+5hAawwBwQGHG3TvKqxuD3uarr1bTPJKqQ=; b=HUEqLrNunFECsYaC8ZMJ1/jxIf3uYwYEWZhUTLnM1FpGwkxKfhcAxZrpLhKWZ6gdxv OSWwqXe6QmGIwUG28ip/Z5DVAbEkSJ48iZ1y1DkqiBHlPFWnvj+ydtRnJN3KLL9H//qt 8NV/p0kbLpdm8q/9enTLMnzI0yMG+vV5y9auhutrXcQ7hukxL67FL3Dmhq4J0AmQDBcB rK/41Lbaok1vy8TBlJnGUyjBAVpzSlqA1tTie+B5Owoaf6OR06gj5x6dSWTNaUZY8M9W +A6rkWSztv/eUMoO3hHyClMNt1dtBLXWf70GEh2WstyhAIBmItN78mCoGSI84iN31Kqk PYEw== 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 r129si1278981pfc.202.2018.04.18.06.51.11; Wed, 18 Apr 2018 06:51:25 -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 S1753575AbeDRNtn (ORCPT + 99 others); Wed, 18 Apr 2018 09:49:43 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6746 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753114AbeDRNtl (ORCPT ); Wed, 18 Apr 2018 09:49:41 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 4EBE3D37E6AD3; Wed, 18 Apr 2018 21:49:25 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.361.1; Wed, 18 Apr 2018 21:49:13 +0800 From: Wei Yongjun To: Greg Ungerer , Geert Uytterhoeven CC: Wei Yongjun , , , Subject: [PATCH -next] m68k: fix return value check in mcf_pci_init() Date: Wed, 18 Apr 2018 13:57:22 +0000 Message-ID: <1524059842-22099-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In case of error, the function ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: bf114d773167 ("m68k: force use of __raw_read/__raw_write address to be iomem") Signed-off-by: Wei Yongjun --- arch/m68k/coldfire/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/coldfire/pci.c b/arch/m68k/coldfire/pci.c index 9d6342c..a7c2332 100644 --- a/arch/m68k/coldfire/pci.c +++ b/arch/m68k/coldfire/pci.c @@ -218,7 +218,7 @@ static int __init mcf_pci_init(void) /* Keep a virtual mapping to IO/config space active */ iospace = ioremap(PCI_IO_PA, PCI_IO_SIZE); - if (IS_ERR(iospace)) + if (!iospace) return -ENODEV; pr_info("Coldfire: PCI IO/config window mapped to 0x%p\n", iospace);