diff --git a/nimble/host/mesh/src/settings.c b/nimble/host/mesh/src/settings.c index 72ae1720f..0f75c305c 100644 --- a/nimble/host/mesh/src/settings.c +++ b/nimble/host/mesh/src/settings.c @@ -380,7 +380,6 @@ static int net_key_set(int argc, char **argv, char *val) static int app_key_set(int argc, char **argv, char *val) { struct bt_mesh_app_key *app; - struct bt_mesh_subnet *sub; struct app_key_val key; u16_t app_idx; int len, err; @@ -412,12 +411,6 @@ static int app_key_set(int argc, char **argv, char *val) return -EINVAL; } - sub = bt_mesh_subnet_get(key.net_idx); - if (!sub) { - BT_ERR("Failed to find subnet 0x%03x", key.net_idx); - return -ENOENT; - } - app = bt_mesh_app_key_find(app_idx); if (!app) { app = bt_mesh_app_key_alloc(app_idx);