]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: android: ion: Remove valid_handle variable in ion_free_nolock
authorJohanna Abrahamsson <johanna@mjao.org>
Tue, 23 Aug 2016 22:02:45 +0000 (00:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2016 15:36:33 +0000 (17:36 +0200)
It is not neccessary to save the value of ion_handle_validate since it
is only used once.

Signed-off-by: Johanna Abrahamsson <johanna@mjao.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c

index bbf13beddb7b70722faf319b4fb19b3e0ea45bd3..46221421be980e8ca07b18bd3a9567914138c8d0 100644 (file)
@@ -548,11 +548,7 @@ EXPORT_SYMBOL(ion_alloc);
 static void ion_free_nolock(struct ion_client *client,
                            struct ion_handle *handle)
 {
-       bool valid_handle;
-
-       valid_handle = ion_handle_validate(client, handle);
-
-       if (!valid_handle) {
+       if (!ion_handle_validate(client, handle)) {
                WARN(1, "%s: invalid handle passed to free.\n", __func__);
                return;
        }