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]
Date:	Fri, 22 May 2015 02:10:06 -0700
From:	tip-bot for Axel Lin <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	jason@...edaemon.net, tglx@...utronix.de,
	linux-kernel@...r.kernel.org, axel.lin@...ics.com,
	mingo@...nel.org, matthias.bgg@...il.com,
	yingjoe.chen@...iatek.com, linux-mediatek@...ts.infradead.org,
	hpa@...or.com
Subject: [tip:irq/core] irqchip: mtk-sysirq:
  Make mtk_sysirq_of_init return error if ioremap fails

Commit-ID:  e1a96fb861b0781c8ef66a76d0fc6fb6f628f84c
Gitweb:     http://git.kernel.org/tip/e1a96fb861b0781c8ef66a76d0fc6fb6f628f84c
Author:     Axel Lin <axel.lin@...ics.com>
AuthorDate: Thu, 21 May 2015 22:57:34 +0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 22 May 2015 11:06:47 +0200

irqchip: mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails

PTR_ERR(NULL) returns 0 so current code returns 0 if ioremap fails, fix it.

Signed-off-by: Axel Lin <axel.lin@...ics.com>
Reviewed-by: Matthias Brugger <matthias.bgg@...il.com>
Cc: Yingjoe Chen <yingjoe.chen@...iatek.com>
Cc: linux-mediatek@...ts.infradead.org <linux-mediatek@...ts.infradead.org>
Cc: Jason Cooper <jason@...edaemon.net>
Link: http://lkml.kernel.org/r/1432220254.29544.1.camel@ingics.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 drivers/irqchip/irq-mtk-sysirq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
index 04de2d4..15c1303 100644
--- a/drivers/irqchip/irq-mtk-sysirq.c
+++ b/drivers/irqchip/irq-mtk-sysirq.c
@@ -144,7 +144,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
 	chip_data->intpol_base = ioremap(res.start, size);
 	if (!chip_data->intpol_base) {
 		pr_err("mtk_sysirq: unable to map sysirq register\n");
-		ret = PTR_ERR(chip_data->intpol_base);
+		ret = -ENXIO;
 		goto out_free;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ