Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/timers: fix write return value handlng

The function can return negative value.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>

authored by

Andrzej Hajda and committed by
John Stultz
3b44edaa 390dd67c

+1 -1
+1 -1
tools/testing/selftests/timers/clocksource-switch.c
··· 97 97 int change_clocksource(char *clocksource) 98 98 { 99 99 int fd; 100 - size_t size; 100 + ssize_t size; 101 101 102 102 fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_WRONLY); 103 103