summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctc4xxp
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-03-23 23:48:33 +0000
committerShaun Ruffell <sruffell@digium.com>2009-03-23 23:48:33 +0000
commit6a786d2f286b3ec588491c1a0c935dc24bb9cc8e (patch)
tree0ef458b14d4210834b2e458b70c60ee18b42d902 /drivers/dahdi/wctc4xxp
parentd76e222c79d85e03c016e6ca8fb9b3c498cb041a (diff)
If the driver fails to register, make sure we cleanup the command cache.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6220 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctc4xxp')
-rw-r--r--drivers/dahdi/wctc4xxp/base.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index c39460a..c21ff3d 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -3494,8 +3494,10 @@ static int __init wctc4xxp_init(void)
spin_lock_init(&wctc4xxp_list_lock);
INIT_LIST_HEAD(&wctc4xxp_list);
res = dahdi_pci_module(&wctc4xxp_driver);
- if (res)
+ if (res) {
+ kmem_cache_destroy(cmd_cache);
return -ENODEV;
+ }
return 0;
}