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
commit9dbd755a20e758272561c95c2e9cb0584b75018c (patch)
tree0ef458b14d4210834b2e458b70c60ee18b42d902 /drivers/dahdi/wctc4xxp
parent0ef392bd802a3c7b91ef26202fa0db89ad71f612 (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;
}