lkml.org 
[lkml]   [2016]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 14/63] clocksource/drivers/bcm_kona: Convert init function to return error
From
Date
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

\
 
 \ /
  Last update: 2016-06-20 20:21    [W:0.099 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site