Merge "supplicant: Handle hidl registration failure" into sc-dev am: 3ddbef190d

Original change: https://googleplex-android-review.googlesource.com/c/platform/external/wpa_supplicant_8/+/13463039

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I772063bc2fda32fc3fefcfca4ba6c3a99bf3cb85
diff --git a/wpa_supplicant/hidl/1.4/hidl.cpp b/wpa_supplicant/hidl/1.4/hidl.cpp
index 1a75123..1e55305 100644
--- a/wpa_supplicant/hidl/1.4/hidl.cpp
+++ b/wpa_supplicant/hidl/1.4/hidl.cpp
@@ -66,7 +66,9 @@
 	hidl_manager = HidlManager::getInstance();
 	if (!hidl_manager)
 		goto err;
-	hidl_manager->registerHidlService(global);
+	if (hidl_manager->registerHidlService(global)) {
+		goto err;
+	}
 	// We may not need to store this hidl manager reference in the
 	// global data strucure because we've made it a singleton class.
 	priv->hidl_manager = (void *)hidl_manager;