summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorutil/periodic_work.c
diff options
context:
space:
mode:
authorKen Cox <jkc@redhat.com>2014-03-19 13:06:21 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-19 13:56:31 -0700
commit61e03b433d22d9473432e6427c505db986d4681d (patch)
treeacfd732b127849e9a6664c8a3d16836a90f0403c /drivers/staging/unisys/visorutil/periodic_work.c
parent4cb005a93ceec3ffaf5584a27dafa9ae64944fa7 (diff)
downloadlinux-61e03b433d22d9473432e6427c505db986d4681d.tar.bz2
Staging: unisys: Remove RETBOOL macro
The RETBOOL macro contained a goto statement which is not allowed in the kernel. Signed-off-by: Ken Cox <jkc@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorutil/periodic_work.c')
-rw-r--r--drivers/staging/unisys/visorutil/periodic_work.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/staging/unisys/visorutil/periodic_work.c b/drivers/staging/unisys/visorutil/periodic_work.c
index fb1e894ebdc1..0670a3174682 100644
--- a/drivers/staging/unisys/visorutil/periodic_work.c
+++ b/drivers/staging/unisys/visorutil/periodic_work.c
@@ -96,15 +96,17 @@ BOOL visor_periodic_work_nextperiod(PERIODIC_WORK *periodic_work)
if (periodic_work->want_to_stop) {
periodic_work->is_scheduled = FALSE;
periodic_work->want_to_stop = FALSE;
- RETBOOL(TRUE); /* yes, TRUE; see visor_periodic_work_stop() */
+ rc = TRUE; /* yes, TRUE; see visor_periodic_work_stop() */
+ goto Away;
} else if (queue_delayed_work(periodic_work->workqueue,
&periodic_work->work,
periodic_work->jiffy_interval) < 0) {
ERRDEV(periodic_work->devnam, "queue_delayed_work failed!");
periodic_work->is_scheduled = FALSE;
- RETBOOL(FALSE);
+ rc = FALSE;
+ goto Away;
}
- RETBOOL(TRUE);
+ rc = TRUE;
Away:
write_unlock(&periodic_work->lock);
return rc;
@@ -122,12 +124,15 @@ BOOL visor_periodic_work_start(PERIODIC_WORK *periodic_work)
BOOL rc = FALSE;
write_lock(&periodic_work->lock);
- if (periodic_work->is_scheduled)
- RETBOOL(FALSE);
+ if (periodic_work->is_scheduled) {
+ rc = FALSE;
+ goto Away;
+ }
if (periodic_work->want_to_stop) {
ERRDEV(periodic_work->devnam,
"dev_start_periodic_work failed!");
- RETBOOL(FALSE);
+ rc = FALSE;
+ goto Away;
}
INIT_DELAYED_WORK(&periodic_work->work, &periodic_work_func);
if (queue_delayed_work(periodic_work->workqueue,
@@ -135,10 +140,11 @@ BOOL visor_periodic_work_start(PERIODIC_WORK *periodic_work)
periodic_work->jiffy_interval) < 0) {
ERRDEV(periodic_work->devnam,
"%s queue_delayed_work failed!", __func__);
- RETBOOL(FALSE);
+ rc = FALSE;
+ goto Away;
}
periodic_work->is_scheduled = TRUE;
- RETBOOL(TRUE);
+ rc = TRUE;
Away:
write_unlock(&periodic_work->lock);
return rc;