Skip to content

Commit 0d4f685

Browse files
martintvcarlescufi
authored andcommitted
Bluetooth: Host: avoid runtime warning in bt_enable
Avoid runtime warning in bt_enable when CONFIG_BT_SETTINGS and CONFIG_BT_DEVICE_NAME_DYNAMIC is not set. This warning was intoroduced in commit d76bba4 ("Bluetooth: host: Device name handling of invalid length") Signed-off-by: Martin Tverdal <[email protected]>
1 parent 5dc6686 commit 0d4f685

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/host/hci_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3564,7 +3564,7 @@ int bt_enable(bt_ready_cb_t cb)
35643564
if (err) {
35653565
return err;
35663566
}
3567-
} else {
3567+
} else if (IS_ENABLED(CONFIG_BT_DEVICE_NAME_DYNAMIC)) {
35683568
err = bt_set_name(CONFIG_BT_DEVICE_NAME);
35693569
if (err) {
35703570
BT_WARN("Failed to set device name (%d)", err);

0 commit comments

Comments
 (0)