mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
card: don't allow the CARD_NEW hook to fail
There is currently no use for allowing modules to cancel card creation, and I don't see need for that in the future either. Let's simplify things by removing the failure handling code.
This commit is contained in:
parent
59e76ca949
commit
18d44b9759
1 changed files with 1 additions and 6 deletions
|
|
@ -149,12 +149,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pa_card_new_data_set_name(data, name);
|
pa_card_new_data_set_name(data, name);
|
||||||
|
pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data);
|
||||||
if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data) < 0) {
|
|
||||||
pa_xfree(c);
|
|
||||||
pa_namereg_unregister(core, name);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
c->core = core;
|
c->core = core;
|
||||||
c->name = pa_xstrdup(data->name);
|
c->name = pa_xstrdup(data->name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue