Re: [PATCH] staging: android: ion: Remove ret variable in ion_handle_put_nolock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <labbott@xxxxxxxxxx>

Signed-off-by: Johanna Abrahamsson <johanna@xxxxxxxx>
---
 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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux