From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> We do not need to check twice for the same conditions. Results in clearer code and smaller binary. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_gem.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 8588c83abb35..f7051df781d2 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1372,12 +1372,7 @@ int i915_gem_request_add_to_client(struct drm_i915_gem_request *req, { struct drm_i915_file_private *file_priv; - WARN_ON(!req || !file || req->file_priv); - - if (!req || !file) - return -EINVAL; - - if (req->file_priv) + if (WARN_ON(!req || !file || req->file_priv)) return -EINVAL; file_priv = file->driver_priv; -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx