Commit e2a2d385 authored by Daniel Lezcano's avatar Daniel Lezcano

clocksource/drivers/moxart: Replace panic by pr_err

The clksrc-of code is supposed to catch the return code and fail gracefully.

Don't panic on error, but print the error and exit with a relevant error
code.
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: default avatarJoel Stanley <joel@jms.id.au>
parent cf1e929c
...@@ -184,8 +184,10 @@ static int __init moxart_timer_init(struct device_node *node) ...@@ -184,8 +184,10 @@ static int __init moxart_timer_init(struct device_node *node)
} else if (of_device_is_compatible(node, "aspeed,ast2400-timer")) { } else if (of_device_is_compatible(node, "aspeed,ast2400-timer")) {
timer->t1_enable_val = ASPEED_TIMER1_ENABLE; timer->t1_enable_val = ASPEED_TIMER1_ENABLE;
timer->t1_disable_val = ASPEED_TIMER1_DISABLE; timer->t1_disable_val = ASPEED_TIMER1_DISABLE;
} else } else {
panic("%s: unknown platform\n", node->full_name); pr_err("%s: unknown platform\n", node->full_name);
return -EINVAL;
}
timer->count_per_tick = DIV_ROUND_CLOSEST(pclk, HZ); timer->count_per_tick = DIV_ROUND_CLOSEST(pclk, HZ);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment