diff options
Diffstat (limited to 'drivers/clocksource/clksrc-of.c')
-rw-r--r-- | drivers/clocksource/clksrc-of.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c index b9ddd9e3a2f5..ae2e4278c42a 100644 --- a/drivers/clocksource/clksrc-of.c +++ b/drivers/clocksource/clksrc-of.c | |||
@@ -28,6 +28,7 @@ void __init clocksource_of_init(void) | |||
28 | struct device_node *np; | 28 | struct device_node *np; |
29 | const struct of_device_id *match; | 29 | const struct of_device_id *match; |
30 | clocksource_of_init_fn init_func; | 30 | clocksource_of_init_fn init_func; |
31 | unsigned clocksources = 0; | ||
31 | 32 | ||
32 | for_each_matching_node_and_match(np, __clksrc_of_table, &match) { | 33 | for_each_matching_node_and_match(np, __clksrc_of_table, &match) { |
33 | if (!of_device_is_available(np)) | 34 | if (!of_device_is_available(np)) |
@@ -35,5 +36,8 @@ void __init clocksource_of_init(void) | |||
35 | 36 | ||
36 | init_func = match->data; | 37 | init_func = match->data; |
37 | init_func(np); | 38 | init_func(np); |
39 | clocksources++; | ||
38 | } | 40 | } |
41 | if (!clocksources) | ||
42 | pr_crit("%s: no matching clocksources found\n", __func__); | ||
39 | } | 43 | } |