Skip to content

Commit 2fd0c93

Browse files
paulburtonKAGA-KOKO
authored andcommitted
clocksource/mips-gic-timer: Print an error if IRQ setup fails
We've checked for errors from setup_irq_percpu since commit f95ac85 ("CLOCKSOURCE: mips-gic: Add missing error returns checks") but didn't print an error message in the failure case. This makes it very easy to overlook the GIC timer clock event driver not being registered, since we'll generally just use a different clock event driver if that happens. Print an error if IRQ setup fails in order to make such problems harder to miss (ie. not completely silent). Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Link: http://lkml.kernel.org/r/20160913165644.627-1-paul.burton@imgtec.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 57ccdf4 commit 2fd0c93

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/clocksource/mips-gic-timer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,11 @@ static int gic_clockevent_init(void)
113113
return -ENXIO;
114114

115115
ret = setup_percpu_irq(gic_timer_irq, &gic_compare_irqaction);
116-
if (ret < 0)
116+
if (ret < 0) {
117+
pr_err("GIC timer IRQ %d setup failed: %d\n",
118+
gic_timer_irq, ret);
117119
return ret;
120+
}
118121

119122
cpuhp_setup_state(CPUHP_AP_MIPS_GIC_TIMER_STARTING,
120123
"AP_MIPS_GIC_TIMER_STARTING", gic_starting_cpu,

0 commit comments

Comments
 (0)