Re: [PATCH 2/2] staging: android: ion: Remove valid_handle variable in ion_free_nolock

2016-08-22 Thread Laura Abbott

On 08/22/2016 03:26 AM, Johanna Abrahamsson wrote:

It is not neccessary to save the value of ion_handle_validate since it
is only used once.



Acked-by: Laura Abbott 


Signed-off-by: Johanna Abrahamsson 
---
 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 d209bda..7c5cd5b 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;
}



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


[PATCH 2/2] staging: android: ion: Remove valid_handle variable in ion_free_nolock

2016-08-22 Thread Johanna Abrahamsson
It is not neccessary to save the value of ion_handle_validate since it
is only used once.

Signed-off-by: Johanna Abrahamsson 
---
 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 d209bda..7c5cd5b 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;
}
-- 
2.1.4

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