summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-03-01 08:14:19 +0000
committerShaun Ruffell <sruffell@digium.com>2010-03-01 08:14:19 +0000
commit79403d0c8eb2f24bdaeb96f4c5bb2e867f7f178d (patch)
treef6aa9d4d4c474a279a9a17c9a8a035d81972a78c
parent2030ccd92765b542c80d7d55a9fb79c897e1372c (diff)
wcte12xp: Cleanup if voicebus_start fails.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8177 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wcte12xp/base.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index 4963af2..09978b1 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -1863,7 +1863,11 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi
}
voicebus_lock_latency(&wc->vb);
- voicebus_start(&wc->vb);
+ if (voicebus_start(&wc->vb)) {
+ voicebus_release(&wc->vb);
+ free_wc(wc);
+ return -EIO;
+ }
t1_hardware_post_init(wc);
for (x = 0; x < (wc->spantype == TYPE_E1 ? 31 : 24); x++) {