From: Todd Kjos Date: Tue, 2 May 2017 00:21:51 +0000 (-0700) Subject: FROMLIST: binder: remove dead code in binder_get_ref_for_node X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4cbe57579bc32695afe9735e226587757df8119f;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git FROMLIST: binder: remove dead code in binder_get_ref_for_node (from https://patchwork.kernel.org/patch/9817819/) node is always non-NULL in binder_get_ref_for_node so the conditional and else clause are not needed Change-Id: I89ca8c3c0a1a263624a0bd5ddb14e9093ae12009 Signed-off-by: Todd Kjos --- diff --git a/drivers/android/binder.c b/drivers/android/binder.c index ad17599ec601..e872bf79fd06 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -670,18 +670,12 @@ static struct binder_ref *binder_get_ref_for_node(struct binder_proc *proc, } rb_link_node(&new_ref->rb_node_desc, parent, p); rb_insert_color(&new_ref->rb_node_desc, &proc->refs_by_desc); - if (node) { - hlist_add_head(&new_ref->node_entry, &node->refs); + hlist_add_head(&new_ref->node_entry, &node->refs); - binder_debug(BINDER_DEBUG_INTERNAL_REFS, - "%d new ref %d desc %d for node %d\n", - proc->pid, new_ref->debug_id, new_ref->desc, - node->debug_id); - } else { - binder_debug(BINDER_DEBUG_INTERNAL_REFS, - "%d new ref %d desc %d for dead node\n", - proc->pid, new_ref->debug_id, new_ref->desc); - } + binder_debug(BINDER_DEBUG_INTERNAL_REFS, + "%d new ref %d desc %d for node %d\n", + proc->pid, new_ref->debug_id, new_ref->desc, + node->debug_id); return new_ref; }