Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1245047
| From | Oleksij Rempel <linux@rempel-privat.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v7 1/3] ARM: irqchip: mxs: do panic if icoll_base == NULL |
| Date | 2015-10-12 21:20 +0200 |
| Message-ID | <qiQNA-8hD-23@gated-at.bofh.it> (permalink) |
| References | <qiHKh-3k0-5@gated-at.bofh.it> <qiQNA-8hD-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Current code will only WARN_ON() and dereference the NULL pointer.
In this case it is better to panic and stop execution.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
drivers/irqchip/irq-mxs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-mxs.c b/drivers/irqchip/irq-mxs.c
index 604df63..ce69860 100644
--- a/drivers/irqchip/irq-mxs.c
+++ b/drivers/irqchip/irq-mxs.c
@@ -97,7 +97,8 @@ static int __init icoll_of_init(struct device_node *np,
struct device_node *interrupt_parent)
{
icoll_base = of_iomap(np, 0);
- WARN_ON(!icoll_base);
+ if (!icoll_base)
+ panic("%s: unable to map resource", np->full_name);
/*
* Interrupt Collector reset, which initializes the priority
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v5 2/2] ARM: irqchip: mxs: add Alphascale ASM9260 support Thomas Gleixner <tglx@linutronix.de> - 2015-10-09 16:20 +0200
[PATCH v6 1/2] ARM: irqchip: mxs: prepare driver for HW with different offsets Oleksij Rempel <linux@rempel-privat.de> - 2015-10-10 15:10 +0200
Re: [PATCH v6 1/2] ARM: irqchip: mxs: prepare driver for HW with different offsets Thomas Gleixner <tglx@linutronix.de> - 2015-10-11 20:00 +0200
Re: [PATCH v6 1/2] ARM: irqchip: mxs: prepare driver for HW with different offsets Oleksij Rempel <linux@rempel-privat.de> - 2015-10-12 11:30 +0200
Re: [PATCH v6 1/2] ARM: irqchip: mxs: prepare driver for HW with different offsets Thomas Gleixner <tglx@linutronix.de> - 2015-10-12 11:40 +0200
[PATCH v6 2/2] ARM: irqchip: mxs: add Alphascale ASM9260 support Oleksij Rempel <linux@rempel-privat.de> - 2015-10-12 21:20 +0200
[PATCH v6 1/2] ARM: irqchip: mxs: prepare driver for HW with different offsets Oleksij Rempel <linux@rempel-privat.de> - 2015-10-12 21:20 +0200
[PATCH v7 2/3] ARM: irqchip: mxs: prepare driver for HW with different offsets Oleksij Rempel <linux@rempel-privat.de> - 2015-10-12 21:20 +0200
[tip:irq/core] irqchip/mxs: Prepare driver for hardware with different offsets tip-bot for Oleksij Rempel <tipbot@zytor.com> - 2015-10-14 09:50 +0200
[PATCH v7 1/3] ARM: irqchip: mxs: do panic if icoll_base == NULL Oleksij Rempel <linux@rempel-privat.de> - 2015-10-12 21:20 +0200
[tip:irq/core] irqchip/mxs: Panic if ioremap or domain creation fails tip-bot for Oleksij Rempel <tipbot@zytor.com> - 2015-10-14 09:50 +0200
[PATCH v7 3/3] ARM: irqchip: mxs: add Alphascale ASM9260 support Oleksij Rempel <linux@rempel-privat.de> - 2015-10-12 21:20 +0200
[tip:irq/core] irqchip/mxs: Add Alphascale ASM9260 support tip-bot for Oleksij Rempel <tipbot@zytor.com> - 2015-10-14 09:50 +0200
[PATCH v7 0/3] Add support for ASM9260 interrupt controller Oleksij Rempel <linux@rempel-privat.de> - 2015-10-12 21:20 +0200
[PATCH v6 2/2] ARM: irqchip: mxs: add Alphascale ASM9260 support Oleksij Rempel <linux@rempel-privat.de> - 2015-10-10 15:10 +0200
[PATCH v6 0/2] Add support for ASM9260 interrupt controller Oleksij Rempel <linux@rempel-privat.de> - 2015-10-10 15:10 +0200
csiph-web