time: Fix signedness bug in sysfs_get_uname() and its callers
authorPatrick Palka <patrick@parcs.ath.cx>
Fri, 11 Oct 2013 17:11:55 +0000 (13:11 -0400)
committerJohn Stultz <john.stultz@linaro.org>
Fri, 18 Oct 2013 23:45:58 +0000 (16:45 -0700)
commit891292a767c2453af0e5be9465e95b06b4b29ebe
tree86f9d3856dd7cb253f2b635274b78e81da7e8fe5
parentb7bc50e45111e59419474154736f419a555158d9
time: Fix signedness bug in sysfs_get_uname() and its callers

sysfs_get_uname() is erroneously declared as returning size_t even
though it may return a negative value, specifically -EINVAL.  Its
callers then check whether its return value is less than zero and indeed
that is never the case for size_t.

This patch changes sysfs_get_uname() to return ssize_t and makes sure
its callers use ssize_t accordingly.

Signed-off-by: Patrick Palka <patrick@parcs.ath.cx>
[jstultz: Didn't apply cleanly, as a similar partial fix was also applied
so had to resolve the collisions]
Signed-off-by: John Stultz <john.stultz@linaro.org>
kernel/time/clockevents.c
kernel/time/clocksource.c
kernel/time/tick-internal.h
This page took 0.026907 seconds and 5 git commands to generate.