From: Johanna Abrahamsson Date: Tue, 23 Aug 2016 22:41:54 +0000 (+0200) Subject: staging: android: ion: Remove ret variable in ion_handle_put_nolock X-Git-Tag: v4.9-rc1~119^2~865 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=450524614bd2fc05239dd6186eb6d0deec483c24;p=karo-tx-linux.git staging: android: ion: Remove ret variable in ion_handle_put_nolock It is not necessary to save the return value of kref_put since it is directly returned. Signed-off-by: Johanna Abrahamsson Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index deaa93a2fc48..2671f9fa89d7 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -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)