summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJerome Glisse <[email protected]>2012-01-09 14:59:56 -0500
committerJerome Glisse <[email protected]>2012-01-09 14:59:56 -0500
commitb82a2a848c2f614be6186f411bc366ebe2f189bc (patch)
treec2df417188d5db57e0daa74a2cad8ac12f30671e /src
parent30f86aec01e1e1df4265d10a4618e34e9b8fec95 (diff)
radeon/winsys: fix get info ioctl error checking
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index 442bd2acd14..f337411e223 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -138,9 +138,11 @@ static boolean radeon_get_drm_value(int fd, unsigned request,
info.request = request;
retval = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info));
- if (retval && errname) {
- fprintf(stderr, "radeon: Failed to get %s, error number %d\n",
- errname, retval);
+ if (retval) {
+ if (errname) {
+ fprintf(stderr, "radeon: Failed to get %s, error number %d\n",
+ errname, retval);
+ }
return FALSE;
}
return TRUE;