[rpc_binder] Adjust return when raw socket is not set up

This cl adjusts the return in RpcServer::setupRawSocketServer()
when the socket_fd is not set up. Prior to this cl, errno is
returned. This can be confusing as errno is not always set up in
this case. The current CL fixed this and logged more clear
information.

Test: atest binderRpcTest
Bug: 222479468
Change-Id: Ic9718cbf3cf08befe4044e7f5f021b915b4c4c41
diff --git a/libs/binder/libbinder_rpc_unstable.cpp b/libs/binder/libbinder_rpc_unstable.cpp
index ae07aee..9edb3b6 100644
--- a/libs/binder/libbinder_rpc_unstable.cpp
+++ b/libs/binder/libbinder_rpc_unstable.cpp
@@ -94,6 +94,10 @@
                                 void (*readyCallback)(void* param), void* param) {
     auto server = RpcServer::make();
     auto fd = unique_fd(android_get_control_socket(name));
+    if (!fd.ok()) {
+        LOG(ERROR) << "Failed to get fd for the socket:" << name;
+        return false;
+    }
     if (status_t status = server->setupRawSocketServer(std::move(fd)); status != OK) {
         LOG(ERROR) << "Failed to set up Unix Domain RPC server with name " << name
                    << " error: " << statusToString(status).c_str();