diff mbox series

[v1,2/5] bap: Fix update of sink location value

Message ID 20231020142554.486629-2-kiran.k@intel.com (mailing list archive)
State Accepted
Commit 5f8323f2aaa3c8c3d36bdf541f014ac9065a9398
Headers show
Series [v1,1/5] media: Populate location to qos structure | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

K, Kiran Oct. 20, 2023, 2:25 p.m. UTC
pac->sink_loc needs to be updated only if there is a change.
---
 src/shared/bap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 925501c48d98..2fd21b81b72d 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2491,13 +2491,11 @@  static void pacs_sink_location_changed(struct bt_pacs *pacs)
 
 static void pacs_add_sink_location(struct bt_pacs *pacs, uint32_t location)
 {
-	location |= pacs->sink_loc_value;
-
 	/* Check if location value needs updating */
 	if (location == pacs->sink_loc_value)
 		return;
 
-	pacs->sink_loc_value = location;
+	pacs->sink_loc_value |= location;
 
 	pacs_sink_location_changed(pacs);
 }