staging: unisys: visorbus: cleanup goto in setup_crash_devices_work_queue
authorDavid Kershner <david.kershner@unisys.com>
Fri, 11 Mar 2016 22:01:38 +0000 (17:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
If visorbus has registered yet just reschedule and exit. The rest of
the function doesn't need to reschedule so just move it up to the
initial check.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Timothy Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorchipset.c

index 5fbda7b218c7a9ed06b2050ca276443a17b319d9..3fd4bea6535df7e978f8c2c627ea94cb79498919 100644 (file)
@@ -1979,8 +1979,11 @@ setup_crash_devices_work_queue(struct work_struct *work)
        u16 local_crash_msg_count;
 
        /* make sure visorbus is registered for controlvm callbacks */
-       if (visorchipset_visorbusregwait && !visorbusregistered)
-               goto cleanup;
+       if (visorchipset_visorbusregwait && !visorbusregistered) {
+               poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW;
+               schedule_delayed_work(&periodic_controlvm_work, poll_jiffies);
+               return;
+       }
 
        POSTCODE_LINUX_2(CRASH_DEV_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 
@@ -2057,13 +2060,6 @@ setup_crash_devices_work_queue(struct work_struct *work)
                return;
        }
        POSTCODE_LINUX_2(CRASH_DEV_EXIT_PC, POSTCODE_SEVERITY_INFO);
-       return;
-
-cleanup:
-
-       poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW;
-
-       schedule_delayed_work(&periodic_controlvm_work, poll_jiffies);
 }
 
 static void
This page took 0.027602 seconds and 5 git commands to generate.