It is not necessary to save the return value of kref_put since it is directly returned. 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) -- 2.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel