diff options
author | Benjamin Romer <benjamin.romer@unisys.com> | 2015-10-01 11:52:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-02 11:37:53 +0200 |
commit | f84bd6267d623b49f196d54ba9edc41ff1c4d5e3 (patch) | |
tree | 78fa20506501cc0f96c7161ab823563495a4bb02 /drivers/staging/unisys | |
parent | 07f8260bb65676910d4a16e81a319b33095dccb6 (diff) | |
download | linux-f84bd6267d623b49f196d54ba9edc41ff1c4d5e3.tar.gz |
staging: unisys: correctly handle return value from queue_delayed_work()
Properly handle the return value from queue_delayed_work() - it's a
bool, not an int, so using a less than comparison isn't appropriate.
This mistake was found by David Binderman <dcb314@hotmail.com>.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/visorbus/periodic_work.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/unisys/visorbus/periodic_work.c b/drivers/staging/unisys/visorbus/periodic_work.c index a3631c3591f6..115b7aa9560a 100644 --- a/drivers/staging/unisys/visorbus/periodic_work.c +++ b/drivers/staging/unisys/visorbus/periodic_work.c @@ -86,8 +86,8 @@ bool visor_periodic_work_nextperiod(struct periodic_work *pw) pw->want_to_stop = false; rc = true; /* yes, true; see visor_periodic_work_stop() */ goto unlock; - } else if (queue_delayed_work(pw->workqueue, &pw->work, - pw->jiffy_interval) < 0) { + } else if (!queue_delayed_work(pw->workqueue, &pw->work, + pw->jiffy_interval)) { pw->is_scheduled = false; rc = false; goto unlock; @@ -117,8 +117,8 @@ bool visor_periodic_work_start(struct periodic_work *pw) goto unlock; } INIT_DELAYED_WORK(&pw->work, &periodic_work_func); - if (queue_delayed_work(pw->workqueue, &pw->work, - pw->jiffy_interval) < 0) { + if (!queue_delayed_work(pw->workqueue, &pw->work, + pw->jiffy_interval)) { rc = false; goto unlock; } |