From b82a2a848c2f614be6186f411bc366ebe2f189bc Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 9 Jan 2012 14:59:56 -0500 Subject: [PATCH] radeon/winsys: fix get info ioctl error checking Signed-off-by: Jerome Glisse --- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 8 +++++--- 1 file 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; -- 2.30.2