[dahdi-commits] sruffell: linux/trunk r10331 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Mon Nov 7 16:40:19 CST 2011


Author: sruffell
Date: Mon Nov  7 16:40:15 2011
New Revision: 10331

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10331
Log:
dahdi: Unregister dahdi_device from sysfs if we fail to auto assign spans.

Otherwise, if the _dahdi_assign_span call fails, the dahdi_device will never
be removed from the dahdi_devices virtual bus and the board drivers will not
be reloadable.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>

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

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=10331&r1=10330&r2=10331
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Nov  7 16:40:15 2011
@@ -7025,6 +7025,9 @@
 	list_for_each_entry(s, &ddev->spans, device_node)
 		ret = _dahdi_assign_span(s, 0, 0, 1);
 
+	if (ret)
+		dahdi_sysfs_unregister_device(ddev);
+
 	return ret;
 }
 




More information about the dahdi-commits mailing list