Re: [PATCH V2 14/63] clocksource/drivers/bcm_kona: Convert init function to return error

From: Daniel Lezcano
Date: Mon Jun 20 2016 - 13:40:30 EST


On 06/20/2016 07:22 PM, Ray Jui wrote:

[ ... ]

-static void __init kona_timer_init(struct device_node *node)
+static int __init kona_timer_init(struct device_node *node)
{
u32 freq;
struct clk *external_clk;

if (!of_device_is_available(node)) {
pr_info("Kona Timer v1 marked as disabled in device tree\n");
- return;
+ return 0;

I thought we should return -ENODEV here.

Moreover, if this device node is not enabled, kona_timer_init won't even
be invoked. Can we simply get rid of this check here?

Yes, absolutely :)



--
<http://www.linaro.org/> Linaro.org â Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog