egl: don't set modifier if no modifiers are available

If no modifiers are available, the variable will never be used. Thus
there's no point in initialising it.

Cc: Varad Gautam <varad.gautam@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
Emil Velikov
2017-06-29 00:24:27 +01:00
committed by Emil Velikov
parent 4d8191fd00
commit a2ae8e6076

View File

@@ -2238,8 +2238,6 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
modifier = (uint64_t) attrs.DMABufPlaneModifiersHi[0].Value << 32;
modifier |= (uint64_t) (attrs.DMABufPlaneModifiersLo[0].Value & 0xffffffff);
has_modifier = true;
} else {
modifier = DRM_FORMAT_MOD_INVALID;
}
if (has_modifier) {