From: Eric Engestrom Date: Mon, 15 Aug 2016 14:51:21 +0000 (+0100) Subject: i915: remove unnecessary `if` X-Git-Tag: upstream/17.1.0~7088 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8af1b540c52fbc9fe34f1b2fef1f728b205ab630;p=platform%2Fupstream%2Fmesa.git i915: remove unnecessary `if` if (x) return true; else return false; can be simplified as: return x; since `x` is already a boolean expression. Signed-off-by: Eric Engestrom Reviewed-by: Chris Wilson Reviewed-by: Emil Velikov --- diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 77f03fa..19f7a6a 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -489,9 +489,7 @@ intel_query_image(__DRIimage *image, int attrib, int *value) *value = image->planar_format->components; return true; case __DRI_IMAGE_ATTRIB_FD: - if (drm_intel_bo_gem_export_to_prime(image->region->bo, value) == 0) - return true; - return false; + return !drm_intel_bo_gem_export_to_prime(image->region->bo, value); default: return false; }