diff options
author | Shaun Ruffell <sruffell@digium.com> | 2012-06-23 04:36:08 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2012-06-23 04:36:08 +0000 |
commit | 4263810c18f7652d2f18f56c97d81cc8c4e61731 (patch) | |
tree | ec9d4533d9fc411c41afccfb1d814c7d421b67f0 | |
parent | 1cb2393ffac3e045cee45b2c64d288378e6be672 (diff) |
wcte12xp: Destroy the cache if the linemode is not recognized.
Fixes the following errors when running:
# modprobe wcte12xp default_linemode=blah; modprobe wcte12xp default_linemode=blah
'blah' is an unknown span type.kmem_cache_create: duplicate cache wcte12xp
Call Trace:
[<ffffffff800394cf>] kmem_cache_create+0x572/0x5ac
[<ffffffff800a926e>] __link_module+0x0/0x18
[<ffffffff80064624>] __down_read+0x12/0x92
[<ffffffff8002224d>] __up_read+0x19/0x7f
[<ffffffff8818b01f>] :wcte12xp:te12xp_init+0x1f/0xde
[<ffffffff800a9e37>] sys_init_module+0xbd/0x206
[<ffffffff8005d28d>] tracesys+0xd5/0xe0
Reported-by: James Brown <jbrown@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10695
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.6@10697 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/wcte12xp/base.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index d61c62e..63243a9 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -2940,6 +2940,7 @@ static int __init te12xp_init(void) strcasecmp(default_linemode, "e1")) { pr_err("'%s' is an unknown span type.", default_linemode); default_linemode = "auto"; + kmem_cache_destroy(cmd_cache); return -EINVAL; } res = dahdi_pci_module(&te12xp_driver); |