Merge "supplicant: Handle hidl registration failure" into sc-dev
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;