[PATCH] android/gatt: Simplify find_device helper

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

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux