linux: Only set errno after an error
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 4 Jun 2011 11:30:06 +0000 (12:30 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 4 Jun 2011 11:30:06 +0000 (12:30 +0100)
commitf9159b97834ba4b4e42a07953a33866e7ac90dbd
treeacc86d39f7285d1e50ab80c81ee8324d5a6bd8f4
parenta18460b385ae034830e4efbaaed7e0665c53ad9f
linux: Only set errno after an error

errno is only valid after an error, and was being filled with a garbage
value upon eof.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/linux_sysfs.c