diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp index 8b03d388f6..489ce80b6b 100644 --- a/Kernel/Net/LocalSocket.cpp +++ b/Kernel/Net/LocalSocket.cpp @@ -53,8 +53,7 @@ KResultOr LocalSocket::try_create_connected_pair(int type) auto socket = TRY(LocalSocket::try_create(type)); auto description1 = TRY(FileDescription::try_create(*socket)); - if (auto result = socket->try_set_path("[socketpair]"sv); result.is_error()) - return result; + TRY(socket->try_set_path("[socketpair]"sv)); socket->set_acceptor(Process::current()); socket->set_connected(true);