[svn-commits] sruffell: linux/trunk r9536 - /linux/trunk/drivers/dahdi/wcte12xp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Dec 15 17:53:20 UTC 2010


Author: sruffell
Date: Wed Dec 15 11:53:16 2010
New Revision: 9536

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9536
Log:
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 at digium.com>
Acked-by: Kinsey Moore <kmoore at digium.com>
Acked-By: Russ Meyerriecks <rmeyerriecks at digium.com>

Modified:
    linux/trunk/drivers/dahdi/wcte12xp/base.c

Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=9536&r1=9535&r2=9536
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Wed Dec 15 11:53:16 2010
@@ -725,13 +725,6 @@
 #endif
 
 	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)
@@ -2358,6 +2351,8 @@
 	if (!wc)
 		return;
 
+	dahdi_unregister(&wc->span);
+
 	remove_sysfs_files(wc);
 
 	clear_bit(INITIALIZED, &wc->bit_flags);
@@ -2381,7 +2376,8 @@
 	}
 #endif
 
-	t1_release(wc);
+	t1_info(wc, "Freed a Wildcard TE12xP.\n");
+	free_wc(wc);
 }
 
 static struct pci_device_id te12xp_pci_tbl[] = {




More information about the svn-commits mailing list