All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] android/gatt: Remove redundant search
@ 2015-02-10 12:48 Jakub Tyszkowski
  2015-02-10 12:48 ` [PATCH 2/6] android/gatt: Remove REQUEST_INIT state Jakub Tyszkowski
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jakub Tyszkowski @ 2015-02-10 12:48 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski

Searching for device is not needed since we have reference counting and
device is there as long as app connection exist.
---
 android/gatt.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/android/gatt.c b/android/gatt.c
index 4398194..425d3e8 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -914,14 +914,10 @@ static void destroy_connection(void *data)
 	if (conn->timeout_id > 0)
 		g_source_remove(conn->timeout_id);
 
-	if (!queue_find(gatt_devices, match_by_value, conn->device))
-		goto cleanup;
-
 	conn->device->conn_cnt--;
 	if (conn->device->conn_cnt == 0)
 		connection_cleanup(conn->device);
 
-cleanup:
 	queue_destroy(conn->transactions, free);
 	device_unref(conn->device);
 	free(conn);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-11 11:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-10 12:48 [PATCH 1/6] android/gatt: Remove redundant search Jakub Tyszkowski
2015-02-10 12:48 ` [PATCH 2/6] android/gatt: Remove REQUEST_INIT state Jakub Tyszkowski
2015-02-10 12:48 ` [PATCH 3/6] android/gatt: Minor debug message change Jakub Tyszkowski
2015-02-10 12:48 ` [PATCH 4/6] android/gatt: Minor function renames Jakub Tyszkowski
2015-02-10 12:48 ` [PATCH 5/6] android/gatt: Remove reduntant comparison Jakub Tyszkowski
2015-02-10 12:48 ` [PATCH 6/6] android/gatt: Remove device's connection counter Jakub Tyszkowski
2015-02-11 11:27 ` [PATCH 1/6] android/gatt: Remove redundant search Szymon Janc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.