PR #50327: Prevent glGetError infinity

Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/50327

if EGL context is not available, the glGetError always return GL_INVALID_OPERATION.

I use my simple EGL to WGL wrapper, and found an infinite loop when destroying interpreter.
https://github.com/metarutaiga/TensorFlowLiteReduce/blob/master/third_party/EGL/egl_windows.c
Copybara import of the project:
--
18670dfb2e7a020027b863e1beb216249e2ea198 by metarutaiga

PiperOrigin-RevId: 385171233
Change-Id: I2e7aa4267a2ab1e98228cda653717eaf2dc44105
diff --git a/tensorflow/lite/delegates/gpu/gl/gl_errors.cc b/tensorflow/lite/delegates/gpu/gl/gl_errors.cc
index 374e9c2..3cbfdbe 100644
--- a/tensorflow/lite/delegates/gpu/gl/gl_errors.cc
+++ b/tensorflow/lite/delegates/gpu/gl/gl_errors.cc
@@ -64,10 +64,6 @@
   // GPU process.
   return absl::OkStatus();
 #else
-  EGLContext context = eglGetCurrentContext();
-  if (context == EGL_NO_CONTEXT) {
-    return absl::InternalError("EGL Context is not available");
-  }
   auto error = glGetError();
   if (error == GL_NO_ERROR) {
     return absl::OkStatus();