Re: [PATCH v9 4/4] rtc: ds1307: add frequency_test_enable sysfs attribute to check tick on m41txx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

Il 18/07/2018 18:26, Andy Shevchenko ha scritto:
On Wed, Jul 18, 2018 at 5:06 PM, Giulio Benetti
<giulio.benetti@xxxxxxxxxxxxxxxx> wrote:

+       int ret;
+
+       ret = kstrtobool(buf, &freq_test_en);
+       if (ret == -EINVAL) {

What kind of other error code you may expect and why they are not
considered as no error?

According to documentation, kstrtobool can only fail with -EINVAL.
See:
https://elixir.bootlin.com/linux/v4.18-rc5/source/lib/kstrtox.c#L332

That's correct. So, what do you want to show by explicitly mentioned
an error code in the condition?


So you mean I should check for negative values instead of specific error, right?

Thanks

Giulio



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux