lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat,  6 Feb 2016 22:24:56 +0800
From:	weiyj_lk@....com
To:	Jun Nie <jun.nie@...aro.org>, Russell King <linux@....linux.org.uk>
Cc:	Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ARM: zx: Fix return value check in zx296702_pd_probe()

From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

In case of error, the function devm_ioremap_resource() returns
ERR_PTR() and never returns NULL. The NULL test in the return
value check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
 arch/arm/mach-zx/zx296702-pm-domain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-zx/zx296702-pm-domain.c b/arch/arm/mach-zx/zx296702-pm-domain.c
index e08574d..2037bcb 100644
--- a/arch/arm/mach-zx/zx296702-pm-domain.c
+++ b/arch/arm/mach-zx/zx296702-pm-domain.c
@@ -169,9 +169,9 @@ static int zx296702_pd_probe(struct platform_device *pdev)
 	}
 
 	pcubase = devm_ioremap_resource(&pdev->dev, res);
-	if (!pcubase) {
+	if (IS_ERR(pcubase)) {
 		dev_err(&pdev->dev, "ioremap fail.\n");
-		return -EIO;
+		return PTR_ERR(pcubase);
 	}
 
 	for (i = 0; i < ARRAY_SIZE(zx296702_pm_domains); ++i)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ