Commit d4ec15e1 authored by Lucas Tanure's avatar Lucas Tanure Committed by Greg Kroah-Hartman

staging: android: Clean up else statement from binder_send_failed_reply

Kernel coding style. Remove useless else statement after return.

Changes from v1 and v2: Fix warning for mixed declarations and code.
Declaration of "struct binder_transaction *next" made outside of while.

Changes from v3: Removed initialization to NULL for next variable.
Signed-off-by: default avatarLucas Tanure <tanure@linux.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a44b50f
...@@ -1185,6 +1185,7 @@ static void binder_send_failed_reply(struct binder_transaction *t, ...@@ -1185,6 +1185,7 @@ static void binder_send_failed_reply(struct binder_transaction *t,
uint32_t error_code) uint32_t error_code)
{ {
struct binder_thread *target_thread; struct binder_thread *target_thread;
struct binder_transaction *next;
BUG_ON(t->flags & TF_ONE_WAY); BUG_ON(t->flags & TF_ONE_WAY);
while (1) { while (1) {
...@@ -1212,24 +1213,23 @@ static void binder_send_failed_reply(struct binder_transaction *t, ...@@ -1212,24 +1213,23 @@ static void binder_send_failed_reply(struct binder_transaction *t,
target_thread->return_error); target_thread->return_error);
} }
return; return;
} else { }
struct binder_transaction *next = t->from_parent; next = t->from_parent;
binder_debug(BINDER_DEBUG_FAILED_TRANSACTION, binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
"send failed reply for transaction %d, target dead\n", "send failed reply for transaction %d, target dead\n",
t->debug_id); t->debug_id);
binder_pop_transaction(target_thread, t); binder_pop_transaction(target_thread, t);
if (next == NULL) { if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
"reply failed, no target thread at root\n");
return;
}
t = next;
binder_debug(BINDER_DEBUG_DEAD_BINDER, binder_debug(BINDER_DEBUG_DEAD_BINDER,
"reply failed, no target thread -- retry %d\n", "reply failed, no target thread at root\n");
t->debug_id); return;
} }
t = next;
binder_debug(BINDER_DEBUG_DEAD_BINDER,
"reply failed, no target thread -- retry %d\n",
t->debug_id);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment