patch-2.1.105 linux/drivers/sound/uart401.c

Next file: linux/fs/proc/array.c
Previous file: linux/drivers/sound/soundcard.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.104/linux/drivers/sound/uart401.c linux/drivers/sound/uart401.c
@@ -432,7 +432,6 @@
 
 	if (!devc->share_irq)
 		free_irq(devc->irq, devc);
-	sound_unload_mididev(hw_config->slots[4]);
 	if (devc)
 	{
 		kfree(midi_devs[devc->my_dev]->converter);
@@ -440,6 +439,8 @@
 		kfree(devc);
 		devc = NULL;
 	}
+	/* This kills midi_devs[x] */
+	sound_unload_mididev(hw_config->slots[4]);
 }
 
 #ifdef MODULE

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov