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>] [day] [month] [year] [list]
Message-ID: <20181126081229.zzgbambzjnbmmo7e@kili.mountain>
Date:   Mon, 26 Nov 2018 11:12:29 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Arnd Bergmann <arnd@...db.de>, Peng Hao <peng.hao2@....com.cn>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] misc/pvpanic: fix a NULL vs IS_ERR() check

The devm_ioremap_resource() function doesn't return NULL, it returns
error pointers.

Fixes: 46f934c9a12f ("misc/pvpanic: add support to get pvpanic device info FDT")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
 drivers/misc/pvpanic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c
index 01241ec6a5cd..595ac065b401 100644
--- a/drivers/misc/pvpanic.c
+++ b/drivers/misc/pvpanic.c
@@ -140,8 +140,8 @@ static int pvpanic_mmio_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	base = devm_ioremap_resource(&pdev->dev, mem);
-	if (base == NULL)
-		return -EFAULT;
+	if (IS_ERR(base))
+		return PTR_ERR(base);
 
 	atomic_notifier_chain_register(&panic_notifier_list,
 				       &pvpanic_panic_nb);
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ