dal: Validate register power event

Change-Id: I4f9d24dd1d07616099fa18e1a785b33b1d1f1f32
CRs-Fixed: 3352238
diff --git a/sdm/libs/dal/hw_events_drm.cpp b/sdm/libs/dal/hw_events_drm.cpp
index 765ff13..a418d01 100644
--- a/sdm/libs/dal/hw_events_drm.cpp
+++ b/sdm/libs/dal/hw_events_drm.cpp
@@ -403,7 +403,9 @@
       }
     } break;
     case HWEvent::POWER_EVENT: {
-      RegisterPowerEvents(enable);
+      if (RegisterPowerEvents(enable) != kErrorNone) {
+        return kErrorResources;
+      }
     } break;
     case HWEvent::PANEL_DEAD: {
       RegisterPanelDead(enable);
@@ -655,8 +657,8 @@
     } else {
       DLOGE("Failed to %s event. Event_thread_name : %s, Ret=%d", (enable) ? "Register" :
             "DeRegister", event_thread_name_.c_str(), ret);
-      return kErrorResources;
     }
+    return kErrorResources;
   }
   return kErrorNone;
 }