gem_reg_read: Only check errno after a definite error
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 30 May 2013 07:37:48 +0000 (08:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 30 May 2013 07:40:43 +0000 (08:40 +0100)
commit2e1c11546a4aa69c1e774aaa653bb9d84552e133
tree5829bf02d3ac9d43fca382f80d12b56e8ca06eb7
parent1cb4f90946289457c3b92773f2ce96b0b03e4a22
gem_reg_read: Only check errno after a definite error

As upon success, errno is invalid and may give spurious false results.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tests/gem_reg_read.c