Change return values of type status_t from NO_ERROR to OK

in bufferhub related directories

Bug: 118696702
Fixes: 118696702
Test: all tests pass.
AHardwareBufferTest BufferHubBuffer_test BufferHubMetadata_test
buffer_hub_binder_service-test buffer_hub_queue_producer-test
libgui_test libsensor_test vrflinger_test buffer_hub-test
buffer_hub_queue-test dvr_buffer_queue-test dvr_api-test
dvr_display-test

Change-Id: Iee198ddbec035856185fcab34b0d631bd3726b77
diff --git a/libs/vr/libbufferhub/buffer_client_impl.cpp b/libs/vr/libbufferhub/buffer_client_impl.cpp
index 30cbb9f..efa9c28 100644
--- a/libs/vr/libbufferhub/buffer_client_impl.cpp
+++ b/libs/vr/libbufferhub/buffer_client_impl.cpp
@@ -26,14 +26,14 @@
   Parcel data, reply;
   status_t ret =
       data.writeInterfaceToken(IBufferClient::getInterfaceDescriptor());
-  if (ret != NO_ERROR) {
+  if (ret != OK) {
     ALOGE("BpBufferClient::isValid: failed to write into parcel; errno=%d",
           ret);
     return false;
   }
 
   ret = remote()->transact(IS_VALID, data, &reply);
-  if (ret == NO_ERROR) {
+  if (ret == OK) {
     return reply.readBool();
   } else {
     ALOGE("BpBufferClient::isValid: failed to transact; errno=%d", ret);
@@ -45,16 +45,16 @@
   Parcel data, reply;
   status_t ret =
       data.writeInterfaceToken(IBufferClient::getInterfaceDescriptor());
-  if (ret != NO_ERROR) {
+  if (ret != OK) {
     ALOGE("BpBufferClient::duplicate: failed to write into parcel; errno=%d",
           ret);
     return ret;
   }
 
   ret = remote()->transact(DUPLICATE, data, &reply);
-  if (ret == NO_ERROR) {
+  if (ret == OK) {
     *outToken = reply.readUint64();
-    return NO_ERROR;
+    return OK;
   } else {
     ALOGE("BpBufferClient::duplicate: failed to transact; errno=%d", ret);
     return ret;
@@ -72,7 +72,7 @@
       CHECK_INTERFACE(IBufferClient, data, reply);
       uint64_t token = 0;
       status_t ret = duplicate(&token);
-      if (ret != NO_ERROR) {
+      if (ret != OK) {
         return ret;
       }
       return reply->writeUint64(token);
diff --git a/libs/vr/libbufferhub/include/private/dvr/ion_buffer.h b/libs/vr/libbufferhub/include/private/dvr/ion_buffer.h
index 860f08a..ed38e7f 100644
--- a/libs/vr/libbufferhub/include/private/dvr/ion_buffer.h
+++ b/libs/vr/libbufferhub/include/private/dvr/ion_buffer.h
@@ -24,7 +24,7 @@
   IonBuffer& operator=(IonBuffer&& other) noexcept;
 
   // Returns check this IonBuffer holds a valid Gralloc buffer.
-  bool IsValid() const { return buffer_ && buffer_->initCheck() == NO_ERROR; }
+  bool IsValid() const { return buffer_ && buffer_->initCheck() == OK; }
 
   // Frees the underlying native handle and leaves the instance initialized to
   // empty.
diff --git a/libs/vr/libbufferhub/ion_buffer.cpp b/libs/vr/libbufferhub/ion_buffer.cpp
index 1295531..1965410 100644
--- a/libs/vr/libbufferhub/ion_buffer.cpp
+++ b/libs/vr/libbufferhub/ion_buffer.cpp
@@ -205,7 +205,7 @@
 
   status_t err =
       buffer_->lock(usage, Rect(x, y, x + width, y + height), address);
-  if (err != NO_ERROR)
+  if (err != OK)
     return -EINVAL;
   else
     return 0;
@@ -220,7 +220,7 @@
 
   status_t err =
       buffer_->lockYCbCr(usage, Rect(x, y, x + width, y + height), yuv);
-  if (err != NO_ERROR)
+  if (err != OK)
     return -EINVAL;
   else
     return 0;
@@ -231,7 +231,7 @@
   ALOGD_IF(TRACE, "IonBuffer::Unlock: handle=%p", handle());
 
   status_t err = buffer_->unlock();
-  if (err != NO_ERROR)
+  if (err != OK)
     return -EINVAL;
   else
     return 0;