Commit 94070ed4 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: refactor uisctrl_unregister_req_handler_ex()

Get rid of the unnecessary goto statement and just return directly.
Signed-off-by: default avatarBryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 717dd09f
......@@ -155,20 +155,14 @@ EXPORT_SYMBOL_GPL(uisctrl_register_req_handler_ex);
int
uisctrl_unregister_req_handler_ex(uuid_le switch_uuid)
{
int rc = 0; /* assume failure */
LOGINF("type=%pUL.\n", &switch_uuid);
if (req_handler_del(switch_uuid) < 0) {
LOGERR("failed to remove %pUL from server list\n",
&switch_uuid);
goto Away;
return 0;
}
atomic_dec(&uisutils_registered_services);
rc = 1; /* success */
Away:
if (!rc)
LOGERR("failed to unregister type %pUL.\n", &switch_uuid);
return rc;
return 1;
}
EXPORT_SYMBOL_GPL(uisctrl_unregister_req_handler_ex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment