On 08/23/2016 03:41 PM, Johanna Abrahamsson wrote:
It is not necessary to save the return value of kref_put since it is directly
returned.


Acked-by: Laura Abbott <labb...@redhat.com>

Signed-off-by: Johanna Abrahamsson <joha...@mjao.org>
---
 drivers/staging/android/ion/ion.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c 
b/drivers/staging/android/ion/ion.c
index e97d667..2035782 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -378,11 +378,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)


_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to