diff options
author | Eric Anholt <eric@anholt.net> | 2012-02-27 17:26:05 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2012-03-09 17:21:00 -0800 |
commit | 3a8884851b72af012a8cb2beea320f094a58e5eb (patch) | |
tree | 53730ea9955d5bccd6f710bceba6159657bd2fb9 /intel | |
parent | c9ce2edfc8d33e760667529250e86e93ff656c3d (diff) |
intel: Fix error check for I915_PARAM_HAS_LLC.
drmIoctl returns -1 on error with errno set to the error value. Other
users of it in this file just check for != 0, and only use errno when
they need to send an error value on to the caller of the API.
Diffstat (limited to 'intel')
-rw-r--r-- | intel/intel_bufmgr_gem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index e87690da..0eb57c48 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -2753,7 +2753,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size) gp.param = I915_PARAM_HAS_LLC; ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GETPARAM, &gp); - if (ret == -EINVAL) { + if (ret != 0) { /* Kernel does not supports HAS_LLC query, fallback to GPU * generation detection and assume that we have LLC on GEN6/7 */ |