gadgetfs: clean up
sigh... * opened files have non-NULL dentries and non-NULL inodes * close_filp() needs current->files only if the file had been in descriptor table. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -275,17 +275,17 @@ static int gaudio_close_snd_dev(struct gaudio *gau)
|
||||
/* Close control device */
|
||||
snd = &gau->control;
|
||||
if (snd->filp)
|
||||
filp_close(snd->filp, current->files);
|
||||
filp_close(snd->filp, NULL);
|
||||
|
||||
/* Close PCM playback device and setup substream */
|
||||
snd = &gau->playback;
|
||||
if (snd->filp)
|
||||
filp_close(snd->filp, current->files);
|
||||
filp_close(snd->filp, NULL);
|
||||
|
||||
/* Close PCM capture device and setup substream */
|
||||
snd = &gau->capture;
|
||||
if (snd->filp)
|
||||
filp_close(snd->filp, current->files);
|
||||
filp_close(snd->filp, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user