Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1481071
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/9] clocksource/drivers/moxart: Replace panic by pr_err |
| Date | 2016-09-12 11:20 +0200 |
| Message-ID | <sgvzb-1it-11@gated-at.bofh.it> (permalink) |
| References | <sgvzb-1it-7@gated-at.bofh.it> <sgvzb-1it-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
Acked-by: Joel Stanley <joel@jms.id.au>
---
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);
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PULL] clockevents for 4.9 Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-12 11:20 +0200
[PATCH 7/9] clocksource/drivers/timer-atmel-pit: Remove uselesss WARN_ON_ONCE Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-12 11:20 +0200
[PATCH 1/9] clocksource/drivers/moxart: Refactor enable/disable Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-12 11:20 +0200
[PATCH 5/9] clocksource/drivers/moxart: Replace panic by pr_err Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-12 11:20 +0200
[PATCH 9/9] clocksource/drivers/oxnas: Add OX820 compatible Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-12 11:20 +0200
[PATCH 8/9] clocksource/drivers/timer-atmel-pit: Simplify IRQ handler Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-12 11:20 +0200
[PATCH 3/9] clocksource/drivers/moxart: Add Aspeed support Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-12 11:20 +0200
[PATCH 2/9] clocksource/drivers/moxart: Use struct to hold state Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-12 11:20 +0200
[PATCH 4/9] clocksource/drivers/moxart: Replace setup_irq by request_irq Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-09-12 11:20 +0200
csiph-web