state = container_of(p, struct proto_shell_state, setup_task);
uloop_timeout_cancel(&state->setup_timeout);
if (state->teardown_pending) {
- state->teardown_pending = 0;
+ state->teardown_pending = false;
proto_shell_handler(&state->proto, PROTO_CMD_TEARDOWN, false);
}
}
state = container_of(p, struct proto_shell_state, teardown_task);
state->proto.proto_event(&state->proto, IFPEV_DOWN);
- device_remove_user(&state->l3_dev);
+ if (state->l3_dev.dev)
+ device_remove_user(&state->l3_dev);
}
static void