Diff between fe71fa3dfe26e4d3fd7c5b83ff78035bf5e7a38f and be79cd19c5c5f6b42e40c0edb04d67ab21773f19

Changed Files

File Additions Deletions Status
src/shared/bap.c +2 -4 modified

Full Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index f553096..b452461 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -5163,12 +5163,10 @@ int bt_bap_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac,
 
 			/* Check if there are any channels left to select */
 			map.count &= ~(map.count & rc->count);
-			if (!map.count)
-				break;
-
 			/* Check if there are any locations left to select */
 			map.location &= ~(map.location & rc->location);
-			if (!map.location)
+
+			if (!map.count || !map.location)
 				break;
 
 			/* Check if device require AC*(i) settings */