summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android
diff options
context:
space:
mode:
authorJohanna Abrahamsson <johanna@mjao.org>2016-08-24 00:02:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-01 17:36:33 +0200
commitc2bbedf01fe7a9901828911c7a2d8c27f48a5f16 (patch)
tree42f1535a6125937d778f36f4cf1eb2bde52522bd /drivers/staging/android
parent0210737c85860756efa7d936156e8a94412f5d5c (diff)
downloadlinux-c2bbedf01fe7a9901828911c7a2d8c27f48a5f16.tar.bz2
staging: android: ion: Remove valid_handle variable in ion_free_nolock
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>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r--drivers/staging/android/ion/ion.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index bbf13beddb7b..46221421be98 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -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;
}