Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1479249 > unrolled thread
| Started by | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| First post | 2016-09-08 16:00 +0200 |
| Last post | 2016-09-08 16:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] clocksource/drivers/moxart: Replace panic by pr_err Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-08 16:00 +0200
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2016-09-08 16:00 +0200 |
| Subject | [PATCH 2/2] clocksource/drivers/moxart: Replace panic by pr_err |
| Message-ID | <sf81Y-6tT-15@gated-at.bofh.it> |
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: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/moxart_timer.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/moxart_timer.c b/drivers/clocksource/moxart_timer.c
index cba25b7..2a8f470 100644
--- a/drivers/clocksource/moxart_timer.c
+++ b/drivers/clocksource/moxart_timer.c
@@ -184,8 +184,10 @@ static int __init moxart_timer_init(struct device_node *node)
} else if (of_device_is_compatible(node, "aspeed,ast2400-timer")) {
timer->t1_enable_val = ASPEED_TIMER1_ENABLE;
timer->t1_disable_val = ASPEED_TIMER1_DISABLE;
- } else
- panic("%s: unknown platform\n", node->full_name);
+ } else {
+ pr_err("%s: unknown platform\n", node->full_name);
+ return -EINVAL;
+ }
timer->count_per_tick = DIV_ROUND_CLOSEST(pclk, HZ);
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web