FROMLIST: binder: fix an ret value override
authorXu YiPing <xuyiping@hisilicon.com>
Tue, 5 Sep 2017 17:00:59 +0000 (10:00 -0700)
committerDanny Wood <danwood76@gmail.com>
Fri, 8 Nov 2019 12:03:12 +0000 (12:03 +0000)
(from https://patchwork.kernel.org/patch/9939409/)

commit 372e3147df70 ("binder: guarantee txn complete / errors delivered
in-order") incorrectly defined a local ret value.  This ret value will
be invalid when out of the if block

Change-Id: If7bd963ac7e67d135aa949133263aac27bf15d1a
Signed-off-by: Xu YiPing <xuyiping@hislicon.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
drivers/android/binder.c

index a4a94831d556071cb9cc761d029d5f5f3693b8f7..93c97e1b5af8494cc5fe96635ab63ecb7b5537a1 100644 (file)
@@ -2488,7 +2488,6 @@ static int binder_translate_handle(struct flat_binder_object *fp,
                             (u64)node->ptr);
                binder_node_unlock(node);
        } else {
-               int ret;
                struct binder_ref_data dest_rdata;
 
                binder_node_unlock(node);