wcte12xp: Unregister the span before any additional cleanup.
Span registration is the last step in during initialization and it should be the first on unregistration. I also was hit by this when looking at adding other members to the span and made the assumption that the span was in a consistent state during unregistration. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9536 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
5b6fba6e4b
commit
0c3cbc2c32
@ -727,13 +727,6 @@ static void free_wc(struct t1 *wc)
|
||||
kfree(wc);
|
||||
}
|
||||
|
||||
static void t1_release(struct t1 *wc)
|
||||
{
|
||||
dahdi_unregister(&wc->span);
|
||||
t1_info(wc, "Freed a Wildcard TE12xP.\n");
|
||||
free_wc(wc);
|
||||
}
|
||||
|
||||
static void t4_serial_setup(struct t1 *wc)
|
||||
{
|
||||
t1_info(wc, "Setting up global serial parameters for %s\n",
|
||||
@ -2358,6 +2351,8 @@ static void __devexit te12xp_remove_one(struct pci_dev *pdev)
|
||||
if (!wc)
|
||||
return;
|
||||
|
||||
dahdi_unregister(&wc->span);
|
||||
|
||||
remove_sysfs_files(wc);
|
||||
|
||||
clear_bit(INITIALIZED, &wc->bit_flags);
|
||||
@ -2381,7 +2376,8 @@ static void __devexit te12xp_remove_one(struct pci_dev *pdev)
|
||||
}
|
||||
#endif
|
||||
|
||||
t1_release(wc);
|
||||
t1_info(wc, "Freed a Wildcard TE12xP.\n");
|
||||
free_wc(wc);
|
||||
}
|
||||
|
||||
static struct pci_device_id te12xp_pci_tbl[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user