From 161aadd5909e610fa5e25a5912c882403718e21e Mon Sep 17 00:00:00 2001 From: Pavel Vasilyev Date: Thu, 23 Nov 2023 16:12:06 +0100 Subject: [PATCH] Bluetooth: Mesh: Return immediately if labels not supported This avoid unnecessary triggering of settings work. Signed-off-by: Pavel Vasilyev --- subsys/bluetooth/mesh/va.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subsys/bluetooth/mesh/va.c b/subsys/bluetooth/mesh/va.c index 6db9194da479..b69c22f40e9b 100644 --- a/subsys/bluetooth/mesh/va.c +++ b/subsys/bluetooth/mesh/va.c @@ -306,6 +306,10 @@ void bt_mesh_va_clear(void) { int i; + if (CONFIG_BT_MESH_LABEL_COUNT == 0) { + return; + } + for (i = 0; i < ARRAY_SIZE(virtual_addrs); i++) { if (virtual_addrs[i].ref) { virtual_addrs[i].ref = 0U;