Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426864

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

From Daniel Lezcano <daniel.lezcano@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH V2 14/63] clocksource/drivers/bcm_kona: Convert init function to return error
Date 2016-06-20 19:50 +0200
Message-ID <rMbuF-2Oc-15@gated-at.bofh.it> (permalink)
References <rKN1o-53x-7@gated-at.bofh.it> <rKN1o-53x-9@gated-at.bofh.it> <rMbbk-2Hq-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 14/63] clocksource/drivers/bcm_kona: Convert init function to return error Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-06-16 23:30 +0200
  Re: [PATCH V2 14/63] clocksource/drivers/bcm_kona: Convert init  function to return error Ray Jui <ray.jui@broadcom.com> - 2016-06-20 19:30 +0200
    Re: [PATCH V2 14/63] clocksource/drivers/bcm_kona: Convert init  function to return error Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-06-20 19:50 +0200
    Re: [PATCH V3] clocksource/drivers/bcm_kona: Convert init function to  return error Ray Jui <ray.jui@broadcom.com> - 2016-06-20 20:00 +0200
      Re: [PATCH V3] clocksource/drivers/bcm_kona: Convert init function to  return error Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-06-20 22:20 +0200
    [PATCH V3] clocksource/drivers/bcm_kona: Convert init function to return error Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-06-20 20:00 +0200

csiph-web