It is better to test if(intel == NULL) and simply return in that case.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
{
GET_CURRENT_CONTEXT(ctx);
struct intel_context *intel = intel_context(ctx);
+ if (intel == NULL)
+ return;
- if (intel != NULL) {
- if (intel->gen < 4)
- INTEL_FIREVERTICES(intel);
+ if (intel->gen < 4)
+ INTEL_FIREVERTICES(intel);
- intel->need_throttle = true;
+ intel->need_throttle = true;
- if (intel->batch.used)
- intel_batchbuffer_flush(intel);
- }
+ if (intel->batch.used)
+ intel_batchbuffer_flush(intel);
}
static const struct __DRI2flushExtensionRec intelFlushExtension = {