Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] android/gatt: Simplify find_device helper
@ 2014-03-31  9:26 Marcin Kraglak
  2014-03-31 12:44 ` Szymon Janc
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Kraglak @ 2014-03-31  9:26 UTC (permalink / raw)
  To: linux-bluetooth

We don't need to use dev pointer in second search attempt.
---
 android/gatt.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/android/gatt.c b/android/gatt.c
index e361506..1bddbcf 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -805,11 +805,7 @@ static struct gatt_device *find_device(bdaddr_t *addr)
 	if (dev)
 		return dev;
 
-	dev = queue_find(conn_wait_queue, match_dev_by_bdaddr, addr);
-	if (dev)
-		return dev;
-
-	return NULL;
+	return queue_find(conn_wait_queue, match_dev_by_bdaddr, addr);
 }
 
 static struct gatt_device *find_device_by_conn_id(int32_t conn_id)
-- 
1.8.3.1


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

end of thread, other threads:[~2014-03-31 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-31  9:26 [PATCH] android/gatt: Simplify find_device helper Marcin Kraglak
2014-03-31 12:44 ` Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox