[PATCH v3 3/5] clocksource: armada-370-xp: Replace WARN_ON with BUG_ON

Ezequiel Garcia ezequiel.garcia at free-electrons.com
Tue Aug 20 11:45:52 EDT 2013


If the clock fails to be obtained and the timer fails to be properly
registered, the kernel will freeze real soon. Instead, let's BUG()
where the actual problem is located.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia at free-electrons.com>
---
 drivers/clocksource/time-armada-370-xp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c
index 11d91e5..fca318f 100644
--- a/drivers/clocksource/time-armada-370-xp.c
+++ b/drivers/clocksource/time-armada-370-xp.c
@@ -304,7 +304,7 @@ static void __init armada_370_timer_init(struct device_node *np)
 {
 	struct clk *clk = of_clk_get(np, 0);
 
-	WARN_ON(IS_ERR(clk));
+	BUG_ON(IS_ERR(clk));
 	timer_clk = clk_get_rate(clk) / TIMER_DIVIDER;
 	timer25Mhz = false;
 
-- 
1.8.1.5




More information about the linux-arm-kernel mailing list