linux: check the return value of fread() for sysfs files

There's very few chances the kernel will report garbage here.
Just don't strtoul unless we read at least something. At worse, we'll get 0.

This fixes warning when the libc declares fread() as __attribute_warn_unused_result__