Commit f84bd626 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman
Browse files

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: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 07f8260b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;
	}