staging: android: ion: Remove ret variable in ion_handle_put_nolock
authorJohanna Abrahamsson <johanna@mjao.org>
Tue, 23 Aug 2016 22:41:54 +0000 (00:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2016 15:39:29 +0000 (17:39 +0200)
It is not necessary to save the return value of kref_put since it is directly
returned.

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 deaa93a..2671f9f 100644 (file)
@@ -383,11 +383,7 @@ static void ion_handle_get(struct ion_handle *handle)
 
 static int ion_handle_put_nolock(struct ion_handle *handle)
 {
-       int ret;
-
-       ret = kref_put(&handle->ref, ion_handle_destroy);
-
-       return ret;
+       return kref_put(&handle->ref, ion_handle_destroy);
 }
 
 static int ion_handle_put(struct ion_handle *handle)