From: Alex Elder Date: Mon, 17 Nov 2014 14:08:36 +0000 (-0600) Subject: greybus: move operation timeout teardown X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=19363a2ca1aa7dc48214e4556fa5bfecaf570f3f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: move operation timeout teardown 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 603697e5c116..344f58f5c39c 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -79,9 +79,6 @@ static void gb_pending_operation_remove(struct gb_operation *operation) { 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); @@ -439,6 +436,7 @@ void gb_connection_operation_recv(struct gb_connection *connection, 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 */