gralloc: Fix retrieving metadata state

The call to function GetMetaDataByReference was inadvertently removed
in commit 07f2c74, because `result` was an unused variable.
Restore that call, but do it properly avoiding the compilation issue.

This fixes the logspam:

  E qtigralloc: Unable to get metadata state

Change-Id: I2c2ee63df25c9e2ef5857fef5b3d49454f6240f3
diff --git a/gralloc/gr_buf_mgr.cpp b/gralloc/gr_buf_mgr.cpp
index 372afc0..d81fa5a 100644
--- a/gralloc/gr_buf_mgr.cpp
+++ b/gralloc/gr_buf_mgr.cpp
@@ -911,7 +911,7 @@
   auto metadata = reinterpret_cast<MetaData_t *>(handle->base_metadata);
 
   void *metadata_ptr = nullptr;
-  Error error = Error::NONE;
+  Error error = GetMetaDataByReference(handle, metadatatype_value, &metadata_ptr);
   switch (metadatatype_value) {
     case (int64_t)StandardMetadataType::BUFFER_ID:
       if (metadata_ptr != nullptr) {