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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-216646e4d82e847791f0ba66c439dedd36cb119f@git.kernel.org>
Date:   Sun, 30 Apr 2017 02:45:59 -0700
From:   tip-bot for Wei Yongjun <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     marc.zyngier@....com, weiyongjun1@...wei.com,
        wangkefeng.wang@...wei.com, linux-kernel@...r.kernel.org,
        jason@...edaemon.net, hpa@...or.com, mingo@...nel.org,
        tglx@...utronix.de
Subject: [tip:irq/core] irqchip/mbigen: Fix return value check in
 mbigen_device_probe()

Commit-ID:  216646e4d82e847791f0ba66c439dedd36cb119f
Gitweb:     http://git.kernel.org/tip/216646e4d82e847791f0ba66c439dedd36cb119f
Author:     Wei Yongjun <weiyongjun1@...wei.com>
AuthorDate: Thu, 27 Apr 2017 15:21:13 +0000
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sun, 30 Apr 2017 11:21:16 +0200

irqchip/mbigen: Fix return value check in mbigen_device_probe()

In case of error, the function devm_ioremap() returns NULL pointer
not ERR_PTR(). Use devm_ioremap_resource() instead of devm_ioremap()
to fix the IS_ERR() test issue.

Fixes: 76e1f77f9c26 ("irqchip/mbigen: Introduce mbigen_of_create_domain()")
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: Jason Cooper <jason@...edaemon.net>
Link: http://lkml.kernel.org/r/20170427152113.31147-1-weiyj.lk@gmail.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

---
 drivers/irqchip/irq-mbigen.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 061cdb8..d2306c8 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -337,8 +337,7 @@ static int mbigen_device_probe(struct platform_device *pdev)
 	mgn_chip->pdev = pdev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mgn_chip->base = devm_ioremap(&pdev->dev, res->start,
-				      resource_size(res));
+	mgn_chip->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(mgn_chip->base))
 		return PTR_ERR(mgn_chip->base);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ