drivers: android: binder: Remove excessive indentation
authorMirsal Ennaime <mirsal@mirsal.fr>
Tue, 12 Mar 2013 10:42:01 +0000 (11:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 17:52:48 +0000 (10:52 -0700)
Remove one level of indentation from the binder proc page release code
by using slightly different control semantics.

Signed-off-by: Mirsal Ennaime <mirsal@mirsal.fr>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/binder.c

index ccf3087100e853d4a8553fd2930e22cf6a7d4825..9db21b435f89000f30b2a656821df8f31d99d8ad 100644 (file)
@@ -3001,16 +3001,18 @@ static void binder_deferred_release(struct binder_proc *proc)
                int i;
 
                for (i = 0; i < proc->buffer_size / PAGE_SIZE; i++) {
-                       if (proc->pages[i]) {
-                               void *page_addr = proc->buffer + i * PAGE_SIZE;
-                               binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
-                                            "binder_release: %d: page %d at %p not freed\n",
-                                            proc->pid, i, page_addr);
-                               unmap_kernel_range((unsigned long)page_addr,
-                                       PAGE_SIZE);
-                               __free_page(proc->pages[i]);
-                               page_count++;
-                       }
+                       void *page_addr;
+
+                       if (!proc->pages[i])
+                               continue;
+
+                       page_addr = proc->buffer + i * PAGE_SIZE;
+                       binder_debug(BINDER_DEBUG_BUFFER_ALLOC,
+                                    "binder_release: %d: page %d at %p not freed\n",
+                                    proc->pid, i, page_addr);
+                       unmap_kernel_range((unsigned long)page_addr, PAGE_SIZE);
+                       __free_page(proc->pages[i]);
+                       page_count++;
                }
                kfree(proc->pages);
                vfree(proc->buffer);