Earlier commit refactored/split the parsing into separate hunks.
While no functional change was intended, it did not attribute that
different error is set when the attrib. value is incorrect.
Fixes: 3ee2be4113d ("egl: split _eglParseImageAttribList into per
extension functions")
Cc: Michel Dänzer <michel@daenzer.net>
Reported-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
if (err == EGL_SUCCESS)
continue;
+ /* EXT_image_dma_buf_import states that if invalid value is provided for
+ * its attributes, we should return EGL_BAD_ATTRIBUTE.
+ * Bail out ASAP, since follow-up calls can return another EGL_BAD error.
+ */
+ if (err == EGL_BAD_ATTRIBUTE)
+ return _eglError(err, __func__);
+
err = _eglParseEXTImageDmaBufImportModifiersAttribs(attrs, dpy, attr, val);
if (err == EGL_SUCCESS)
continue;