Move the cancel_delayed_work() call so it's done separate from the
removing the operation from the pending list.
This should have been part of this commit:
d3809f7 greybus: move timeout out of gb_operation_insert()
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
{
struct gb_connection *connection = operation->connection;
- /* Shut down our timeout timer */
- cancel_delayed_work(&operation->timeout_work);
-
/* Take us off of the list of pending operations */
spin_lock_irq(&gb_operations_lock);
list_move_tail(&operation->links, &connection->operations);
gb_connection_err(connection, "operation not found");
return;
}
+ cancel_delayed_work(&operation->timeout_work);
gb_pending_operation_remove(operation);
gbuf = operation->response;
gbuf->status = GB_OP_SUCCESS; /* If we got here we're good */