summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2016-06-07 16:51:00 +0300
committerTanu Kaskinen <tanuk@iki.fi>2016-06-28 16:55:42 +0300
commit18d44b97594233f97d26daf1aaf5e7c953ed3843 (patch)
tree3cbc864378a01b2e56a75ae008e906b4b287b640
parent59e76ca9499fb3b1a6dcfb0525b93b61eb6c1de2 (diff)
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.
-rw-r--r--src/pulsecore/card.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index 410746bf6..0ac70b941 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
@@ -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);
-
- if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data) < 0) {
- pa_xfree(c);
- pa_namereg_unregister(core, name);
- return NULL;
- }
+ pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data);
c->core = core;
c->name = pa_xstrdup(data->name);