Merge "onRegistrationImpl: handle getTransport error" am: c958ae096a am: a8e8f13e8d am: bb5861031e

Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/1557026

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icbfb02854ffd0ebe40ca84d0ed47fe43c6d75404
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index e0813e1..b51c600 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -839,7 +839,13 @@
 
     if (kEnforceVintfManifest && !isTrebleTestingOverride()) {
         using Transport = IServiceManager1_0::Transport;
-        Transport transport = sm->getTransport(descriptor, name);
+        Return<Transport> transport = sm->getTransport(descriptor, name);
+
+        if (!transport.isOk()) {
+            LOG(ERROR) << "Could not get transport for " << descriptor << "/" << name << ": "
+                       << transport.description();
+            return UNKNOWN_ERROR;
+        }
 
         if (transport != Transport::HWBINDER) {
             LOG(ERROR) << "Service " << descriptor << "/" << name