patch-2.4.0-test3 linux/drivers/sound/i810_audio.c

Next file: linux/drivers/sound/nm256_audio.c
Previous file: linux/drivers/sound/esssolo1.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test2/linux/drivers/sound/i810_audio.c linux/drivers/sound/i810_audio.c
@@ -1627,12 +1627,11 @@
 		state->card->free_pcm_channel(state->card, dmabuf->channel->num);
 	}
 
-	kfree(state->card->states[state->virt]);
-	state->card->states[state->virt] = NULL;
-	state->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE);
-
 	/* we're covered by the open_sem */
 	up(&state->open_sem);
+	
+	kfree(state->card->states[state->virt]);
+	state->card->states[state->virt] = NULL;
 
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)