[svn-commits] sruffell: branch 1.4 r3550 - in /branches: 1.2/wcte12xp/ 1.4/wcte12xp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 20 16:09:29 CST 2007


Author: sruffell
Date: Thu Dec 20 16:09:28 2007
New Revision: 3550

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3550
Log:
Cleanup in case the firmware load from userspace fails.

Modified:
    branches/1.2/wcte12xp/vpmadt032.c
    branches/1.4/wcte12xp/vpmadt032.c

Modified: branches/1.2/wcte12xp/vpmadt032.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcte12xp/vpmadt032.c?view=diff&rev=3550&r1=3549&r2=3550
==============================================================================
--- branches/1.2/wcte12xp/vpmadt032.c (original)
+++ branches/1.2/wcte12xp/vpmadt032.c Thu Dec 20 16:09:28 2007
@@ -881,7 +881,7 @@
 		if ((request_firmware(&firmware, vpmadt032_firmware, &wc->dev->dev) != 0) ||
 		    !firmware) {
 			printk("VPMADT032: firmware %s not available from userspace\n", vpmadt032_firmware);
-			return;
+			goto failed_exit;
 		}
 #else
 		embedded_firmware.data = _binary_vpmadt032_bin_start;
@@ -954,6 +954,9 @@
 
 failed_exit:
 	spin_lock_irqsave(&wc->reglock, flags);
+	if (vpm150m->wq) {
+		destroy_workqueue(vpm150m->wq);
+	}
 	wc->vpm150m = NULL;
 	spin_unlock_irqrestore(&wc->reglock, flags);
 	kfree(vpm150m);

Modified: branches/1.4/wcte12xp/vpmadt032.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/wcte12xp/vpmadt032.c?view=diff&rev=3550&r1=3549&r2=3550
==============================================================================
--- branches/1.4/wcte12xp/vpmadt032.c (original)
+++ branches/1.4/wcte12xp/vpmadt032.c Thu Dec 20 16:09:28 2007
@@ -881,7 +881,7 @@
 		if ((request_firmware(&firmware, vpmadt032_firmware, &wc->dev->dev) != 0) ||
 		    !firmware) {
 			printk("VPMADT032: firmware %s not available from userspace\n", vpmadt032_firmware);
-			return;
+			goto failed_exit;
 		}
 #else
 		embedded_firmware.data = _binary_zaptel_fw_vpmadt032_bin_start;
@@ -954,6 +954,9 @@
 
 failed_exit:
 	spin_lock_irqsave(&wc->reglock, flags);
+	if (vpm150m->wq) {
+		destroy_workqueue(vpm150m->wq);
+	}
 	wc->vpm150m = NULL;
 	spin_unlock_irqrestore(&wc->reglock, flags);
 	kfree(vpm150m);




More information about the svn-commits mailing list