Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp88631ybl; Thu, 9 Jan 2020 17:31:25 -0800 (PST) X-Google-Smtp-Source: APXvYqzFXmlZdUq/fUUW7jCX9JjbW8wVxCvE4DcAszUM0hRe+YNFyvH+sH0SXnFL7YOieXmkaNqZ X-Received: by 2002:a05:6808:2ce:: with SMTP id a14mr338340oid.82.1578619885514; Thu, 09 Jan 2020 17:31:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578619885; cv=none; d=google.com; s=arc-20160816; b=N8UuMk6rS9wQu74hXLEAZMwq2tLiv0V8b1CvYhGoo05LA3GpHr+qLTrt2QMewt9A2T iMA2FXeQ8b+sTFeqgGoeFLadLS2cf/byEXv892esnDQyxVeLc/7P+Eo40LcOtdMaKOga vgLwxD1Jffyy+XkIdv90wixpg7LNSBMwTBAU5XwEoQx56Jbksh0LJGjnXo5EYFzpkHAS iYuID9lJGX4UYp6qD66bEIcusIn6YZklpsmPOljZ+StALhaysntO72R0RuVYKrnxdJ18 KQKIB/Lvj2iYhkKdvOuRRBVzjwOfNmlS3EeNxx4VxKWiW2/iefk1SxBflR9cXrEBXbRs r82A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=QmGfRs84FzDPpfZgex730sPGhgFubAbsW417eAEUr5s=; b=v4Eakfl3mEYgOGceVBS67Fvg9ZBi9BRVpYtUV0Zr9z/NV82gz70Ub2HvXHgZ2hr29k B6nuGkh3c0ZoBme/pFO+3vJHadhR76CgNuWoZ3dIQzib1TzQGi+mTKItT6oivvHlafQ9 DRCB0+lPeAD/BOVbbm/oHkTLGcZGOfXQ/os1edjRZc0CWqrdLhoASRa3ufjp2jIFaOGT 3XUcsXANaCcpYhOnZmMNHnMln1+EjzyzZKXncALWn8sBFbdxbs6euieeaSlaBi5P/NIq sgFUqLBYL8KVT3sB9SQkVm9wKeiv20qfzFTYtKom3gOFYt+WUyPjqkDLZJzzw1Tq/fE2 p+2g== 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 u21si149653oiv.267.2020.01.09.17.31.14; Thu, 09 Jan 2020 17:31:25 -0800 (PST) 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 S1730654AbgAJB3y (ORCPT + 99 others); Thu, 9 Jan 2020 20:29:54 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:9145 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730567AbgAJB3y (ORCPT ); Thu, 9 Jan 2020 20:29:54 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 555C6DF5A7A1F72B1F34; Fri, 10 Jan 2020 09:29:52 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Fri, 10 Jan 2020 09:29:43 +0800 From: Wei Yongjun To: Kishon Vijay Abraham I , Philipp Zabel , Jyri Sarha CC: Wei Yongjun , , Subject: [PATCH -next] phy: ti: j721e-wiz: Fix return value check in wiz_probe() Date: Fri, 10 Jan 2020 01:25:33 +0000 Message-ID: <20200110012533.33143-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT 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 devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: b46f531313a4 ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC") Signed-off-by: Wei Yongjun --- drivers/phy/ti/phy-j721e-wiz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index b86ebdd68302..b9654ec89662 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -762,7 +762,7 @@ static int wiz_probe(struct platform_device *pdev) } base = devm_ioremap(dev, res.start, resource_size(&res)); - if (IS_ERR(base)) + if (!base) goto err_addr_to_resource; regmap = devm_regmap_init_mmio(dev, base, &wiz_regmap_config);