Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226945
b: refs/heads/master
c: df4fede
h: refs/heads/master
i:
  226943: 1485e35
v: v3
  • Loading branch information
Richard Röjfors authored and Greg Kroah-Hartman committed Dec 3, 2010
1 parent 6d4a3ae commit d05b7d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ae86689d88bebba16c2db899f845446578d53b3
refs/heads/master: df4fedeaa623f6af0b72c0089000b5ea5540ed22
10 changes: 5 additions & 5 deletions trunk/drivers/usb/gadget/u_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ static int gaudio_open_snd_dev(struct gaudio *card)
ERROR(card, "No such PCM capture device: %s\n", fn_cap);
snd->substream = NULL;
snd->card = NULL;
snd->filp = NULL;
} else {
pcm_file = snd->filp->private_data;
snd->substream = pcm_file->substream;
Expand All @@ -273,17 +274,17 @@ static int gaudio_close_snd_dev(struct gaudio *gau)

/* Close control device */
snd = &gau->control;
if (!IS_ERR(snd->filp))
if (snd->filp)
filp_close(snd->filp, current->files);

/* Close PCM playback device and setup substream */
snd = &gau->playback;
if (!IS_ERR(snd->filp))
if (snd->filp)
filp_close(snd->filp, current->files);

/* Close PCM capture device and setup substream */
snd = &gau->capture;
if (!IS_ERR(snd->filp))
if (snd->filp)
filp_close(snd->filp, current->files);

return 0;
Expand All @@ -304,8 +305,7 @@ int __init gaudio_setup(struct gaudio *card)
ret = gaudio_open_snd_dev(card);
if (ret)
ERROR(card, "we need at least one control device\n");

if (!the_card)
else if (!the_card)
the_card = card;

return ret;
Expand Down

0 comments on commit d05b7d8

Please sign in to comment.