Bluetooth: shell: Fix misleading shell message id-create failed

Fix misleading message in the bluetooth shell when the id-create
command returns en error code. In this case both failure and success
messages are printed.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2021-01-19 15:42:27 +01:00 committed by Anas Nashif
commit 2d50761c3e

View file

@ -672,6 +672,7 @@ static int cmd_id_create(const struct shell *shell, size_t argc, char *argv[])
err = bt_id_create(&addr, NULL);
if (err < 0) {
shell_error(shell, "Creating new ID failed (err %d)", err);
return err;
}
bt_addr_le_to_str(&addr, addr_str, sizeof(addr_str));