summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-12-23 09:21:23 +0100
committerThomas Haller <thaller@redhat.com>2019-12-31 02:13:45 +0100
commiteba629fb07e7129381c477239d5fd19de79bac31 (patch)
treeb015d4eee001eee8a80d3baa257a68e41f831c19
parent2dcd9fa836b1dfc4f76a2955c60b07284c462abb (diff)
downloadNetworkManager-eba629fb07e7129381c477239d5fd19de79bac31.tar.gz
agent-manager: don't handle failure of nm_secret_agent_new() in agent_manager_register_with_capabilities()
This never fails. There is no need to handle an "error".
-rw-r--r--src/settings/nm-agent-manager.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c
index 47cb5c13d1..3f77e00c0a 100644
--- a/src/settings/nm-agent-manager.c
+++ b/src/settings/nm-agent-manager.c
@@ -397,12 +397,6 @@ agent_manager_register_with_capabilities (NMAgentManager *self,
/* Success, add the new agent */
agent = nm_secret_agent_new (context, subject, identifier, capabilities);
- if (!agent) {
- error = g_error_new_literal (NM_AGENT_MANAGER_ERROR,
- NM_AGENT_MANAGER_ERROR_FAILED,
- "Failed to initialize the agent");
- goto done;
- }
g_signal_connect (agent, NM_SECRET_AGENT_DISCONNECTED,
G_CALLBACK (agent_disconnected_cb), self);