]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
clocksource: Fix 'ret' data type of sysfs_override_clocksource() and sysfs_unbind_clo...
authorElad Wexler <elad.wexler@gmail.com>
Thu, 12 Sep 2013 10:28:54 +0000 (13:28 +0300)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 17 Sep 2013 18:19:27 +0000 (11:19 -0700)
commit233bcb411cd32d15c4d04271fa06ca8f2dc24eb8
tree95c3488b678b00241c97c52dc6015c05e285bf10
parent389e067032fbb96e439abafae848dd447e4cafb4
clocksource: Fix 'ret' data type of sysfs_override_clocksource() and sysfs_unbind_clocksource()

sysfs_override_clocksource(): The expression 'if (ret >= 0)' is always true.
This will cause clocksource_select() to always run.
Thus modified ret to be of type ssize_t.

sysfs_unbind_clocksource(): The expression 'if (ret < 0)' is always false.
So in case sysfs_get_uname() failed, the expression won't take an effect.
Thus modified ret to be of type ssize_t.

Signed-off-by: Elad Wexler <elad.wexler@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
kernel/time/clocksource.c