summaryrefslogtreecommitdiff
path: root/arch/arm/plat-samsung/irq-vic-timer.c
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2011-07-16 11:13:47 +0900
committerKukjin Kim <kgene.kim@samsung.com>2011-07-16 11:13:47 +0900
commit691abd0abf8fd496c96fdb5b4fb64721f02aa513 (patch)
treee8a7e9ded2937b3edfbf99ce8e104e1a17981df3 /arch/arm/plat-samsung/irq-vic-timer.c
parent620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc (diff)
ARM: SAMSUNG: Check NULL return from irq_alloc_generic_chip
Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung/irq-vic-timer.c')
-rw-r--r--arch/arm/plat-samsung/irq-vic-timer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c
index a607546ddbd0..f714d060370d 100644
--- a/arch/arm/plat-samsung/irq-vic-timer.c
+++ b/arch/arm/plat-samsung/irq-vic-timer.c
@@ -54,6 +54,13 @@ void __init s3c_init_vic_timer_irq(unsigned int num, unsigned int timer_irq)
s3c_tgc = irq_alloc_generic_chip("s3c-timer", 1, timer_irq,
S3C64XX_TINT_CSTAT, handle_level_irq);
+
+ if (!s3c_tgc) {
+ pr_err("%s: irq_alloc_generic_chip for IRQ %d failed\n",
+ __func__, timer_irq);
+ return;
+ }
+
ct = s3c_tgc->chip_types;
ct->chip.irq_mask = irq_gc_mask_clr_bit;
ct->chip.irq_unmask = irq_gc_mask_set_bit;