From eba629fb07e7129381c477239d5fd19de79bac31 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 23 Dec 2019 09:21:23 +0100 Subject: [PATCH] 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". --- src/settings/nm-agent-manager.c | 6 ------ 1 file changed, 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);