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-prev] [day] [month] [year] [list]
Message-ID: <tip-3424243e39e8ec138486926949e3668e7553125d@git.kernel.org>
Date:   Thu, 1 Nov 2018 04:42:51 -0700
From:   tip-bot for Dan Carpenter <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     gregory.clement@...tlin.com, tglx@...utronix.de, andrew@...n.ch,
        mingo@...nel.org, linux-kernel@...r.kernel.org,
        miquel.raynal@...tlin.com, jason@...edaemon.net,
        sebastian.hesselbarth@...il.com, marc.zyngier@....com,
        hpa@...or.com, dan.carpenter@...cle.com
Subject: [tip:irq/urgent] irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug
 in probe function

Commit-ID:  3424243e39e8ec138486926949e3668e7553125d
Gitweb:     https://git.kernel.org/tip/3424243e39e8ec138486926949e3668e7553125d
Author:     Dan Carpenter <dan.carpenter@...cle.com>
AuthorDate: Sat, 13 Oct 2018 13:22:46 +0300
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 1 Nov 2018 12:38:48 +0100

irqchip/irq-mvebu-sei: Fix a NULL vs IS_ERR() bug in probe function

The devm_ioremap_resource() function never returns NULL, it returns
error pointers.

Fixes: 61ce8d8d8a81 ("irqchip/irq-mvebu-sei: Add new driver for Marvell SEI")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Jason Cooper <jason@...edaemon.net>
Cc: Andrew Lunn <andrew@...n.ch>
Cc: Gregory Clement <gregory.clement@...tlin.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: kernel-janitors@...r.kernel.org
Link: https://lkml.kernel.org/r/20181013102246.GD16086@mwanda

---
 drivers/irqchip/irq-mvebu-sei.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-mvebu-sei.c b/drivers/irqchip/irq-mvebu-sei.c
index 566d69a2edbc..add4c9c934c8 100644
--- a/drivers/irqchip/irq-mvebu-sei.c
+++ b/drivers/irqchip/irq-mvebu-sei.c
@@ -384,9 +384,9 @@ static int mvebu_sei_probe(struct platform_device *pdev)
 
 	sei->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	sei->base = devm_ioremap_resource(sei->dev, sei->res);
-	if (!sei->base) {
+	if (IS_ERR(sei->base)) {
 		dev_err(sei->dev, "Failed to remap SEI resource\n");
-		return -ENODEV;
+		return PTR_ERR(sei->base);
 	}
 
 	/* Retrieve the SEI capabilities with the interrupt ranges */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ