staging: unisys: refactor uisctrl_unregister_req_handler_ex()
authorBenjamin Romer <benjamin.romer@unisys.com>
Fri, 5 Dec 2014 22:09:13 +0000 (17:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Jan 2015 01:32:34 +0000 (17:32 -0800)
Get rid of the unnecessary goto statement and just return directly.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/uislib/uisutils.c

index 9ca10e923d89d5556595342d7fe5658f714b8998..e8c868ea220638e4c6cf2addf5ea067a4e04746b 100644 (file)
@@ -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);
 
This page took 0.025004 seconds and 5 git commands to generate.