From: Johanna Abrahamsson Date: Tue, 23 Aug 2016 22:02:45 +0000 (+0200) Subject: staging: android: ion: Remove valid_handle variable in ion_free_nolock X-Git-Tag: v4.9-rc1~119^2~869 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c2bbedf01fe7a9901828911c7a2d8c27f48a5f16;p=karo-tx-linux.git staging: android: ion: Remove valid_handle variable in ion_free_nolock It is not neccessary to save the value of ion_handle_validate since it is only used once. 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 bbf13beddb7b..46221421be98 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -548,11 +548,7 @@ EXPORT_SYMBOL(ion_alloc); static void ion_free_nolock(struct ion_client *client, struct ion_handle *handle) { - bool valid_handle; - - valid_handle = ion_handle_validate(client, handle); - - if (!valid_handle) { + if (!ion_handle_validate(client, handle)) { WARN(1, "%s: invalid handle passed to free.\n", __func__); return; }