mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 04:17:47 +00:00
staging: ozwpan: Fix wrong error check.
schedule_work() returns true if succeeded & false on failure, error check was doing exactly reverse. Also removes extra variable. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9efed32c22
commit
dfc065f19f
@ -261,17 +261,13 @@ void oz_pd_free(struct work_struct *work)
|
||||
*/
|
||||
void oz_pd_destroy(struct oz_pd *pd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (hrtimer_active(&pd->timeout))
|
||||
hrtimer_cancel(&pd->timeout);
|
||||
if (hrtimer_active(&pd->heartbeat))
|
||||
hrtimer_cancel(&pd->heartbeat);
|
||||
|
||||
INIT_WORK(&pd->workitem, oz_pd_free);
|
||||
ret = schedule_work(&pd->workitem);
|
||||
|
||||
if (ret)
|
||||
if (!schedule_work(&pd->workitem))
|
||||
oz_pd_dbg(pd, ON, "failed to schedule workitem\n");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user