aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Tanure <tanure@linux.com>2014-07-13 21:31:05 -0300
committerRiley Andrews <riandrews@google.com>2015-01-13 22:44:02 +0000
commit0137e89dee95eff290c919c3fafb5b1e7d9fad6a (patch)
treed4f145cd9b8818debc42efd54e0a3bb4b36092b3
parent8802f02dfcf2cf5fb3569fd2b888543ca6a327a6 (diff)
downloadlinux-linaro-stable-0137e89dee95eff290c919c3fafb5b1e7d9fad6a.tar.gz
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. Change-Id: I1ec8b512130595b90098126acf562e58eeca8458 Signed-off-by: Lucas Tanure <tanure@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/android/binder.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 265547b8c5da..cc3f5a151bd6 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1185,6 +1185,7 @@ static void binder_send_failed_reply(struct binder_transaction *t,
uint32_t error_code)
{
struct binder_thread *target_thread;
+ struct binder_transaction *next;
BUG_ON(t->flags & TF_ONE_WAY);
while (1) {
@@ -1212,24 +1213,23 @@ static void binder_send_failed_reply(struct binder_transaction *t,
target_thread->return_error);
}
return;
- } else {
- struct binder_transaction *next = t->from_parent;
+ }
+ next = t->from_parent;
- binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
- "send failed reply for transaction %d, target dead\n",
- t->debug_id);
+ binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
+ "send failed reply for transaction %d, target dead\n",
+ t->debug_id);
- binder_pop_transaction(target_thread, t);
- if (next == NULL) {
- binder_debug(BINDER_DEBUG_DEAD_BINDER,
- "reply failed, no target thread at root\n");
- return;
- }
- t = next;
+ binder_pop_transaction(target_thread, t);
+ if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
- "reply failed, no target thread -- retry %d\n",
- t->debug_id);
+ "reply failed, no target thread at root\n");
+ return;
}
+ t = next;
+ binder_debug(BINDER_DEBUG_DEAD_BINDER,
+ "reply failed, no target thread -- retry %d\n",
+ t->debug_id);
}
}