fix [1964228] emulator crash with the new GL

gralloc didn't keep the error state properly, so after the first pmem allocation failure, it would systematically fail without reverting to ashmem.
diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp
index af1ed66..a371f05 100644
--- a/modules/gralloc/gralloc.cpp
+++ b/modules/gralloc/gralloc.cpp
@@ -195,9 +195,9 @@
 
 static int init_pmem_area(private_module_t* m)
 {
-    int err = 0;
     pthread_mutex_lock(&m->lock);
-    if (m->pmem_master == -1) {
+    int err = m->pmem_master;
+    if (err == -1) {
         err = init_pmem_area_locked(m);
         if (err) {
             m->pmem_master = err;