From: Jerome Glisse Date: Mon, 9 Jan 2012 19:59:56 +0000 (-0500) Subject: radeon/winsys: fix get info ioctl error checking X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b82a2a848c2f614be6186f411bc366ebe2f189bc;p=mesa.git radeon/winsys: fix get info ioctl error checking Signed-off-by: Jerome Glisse --- 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;