[PATCH 1/2] staging: android: ion: Do not BUG on handle client mismatch

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

 



The ion_free() and ion_free_nolock() functions should not BUG on a
handle client mismatch. It is not necessary to explicitly check for that
mismatch when ion_handle_validate is used.

Signed-off-by: Johanna Abrahamsson <johanna@xxxxxxxx>
---
 drivers/staging/android/ion/ion.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 291d5b8..d209bda 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -550,8 +550,6 @@ static void ion_free_nolock(struct ion_client *client,
 {
 	bool valid_handle;
 
-	BUG_ON(client != handle->client);
-
 	valid_handle = ion_handle_validate(client, handle);
 
 	if (!valid_handle) {
@@ -563,8 +561,6 @@ static void ion_free_nolock(struct ion_client *client,
 
 void ion_free(struct ion_client *client, struct ion_handle *handle)
 {
-	BUG_ON(client != handle->client);
-
 	mutex_lock(&client->lock);
 	ion_free_nolock(client, handle);
 	mutex_unlock(&client->lock);
-- 
2.1.4

_______________________________________________
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