Check registerPassthroughServiceImplementation ret

Bug: 34643521
Test: service exits if registerPassthroughServiceImplementation fails.

Change-Id: I27776b24d284f0ec601671589b99e07a737d8509
(cherry picked from commit fd9311cbb74fa30896f23f122a4de6fb49d1e4f0)
diff --git a/transport/include/hidl/LegacySupport.h b/transport/include/hidl/LegacySupport.h
index 18d8ba8..fab8a1d 100644
--- a/transport/include/hidl/LegacySupport.h
+++ b/transport/include/hidl/LegacySupport.h
@@ -61,7 +61,12 @@
 int defaultPassthroughServiceImplementation(std::string name = "default",
                                             size_t maxThreads = 1) {
     configureRpcThreadpool(maxThreads, true);
-    registerPassthroughServiceImplementation<Interface>(name);
+    status_t result = registerPassthroughServiceImplementation<Interface>(name);
+
+    if (result != OK) {
+        return result;
+    }
+
     joinRpcThreadpool();
     return 0;
 }