diff options
| author | Tony Lindgren <tony@atomide.com> | 2012-11-09 14:58:01 -0800 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2012-11-09 14:58:01 -0800 |
| commit | edf8dde393f879fc2d8c22d4bc01ff8d37b80e1a (patch) | |
| tree | 61425adc8b2059a9c12a3ce66ba7361fea1b0bb3 /sound/core/oss/pcm_oss.c | |
| parent | 6ba54ab4a49bbad736b0254aa6bdf0cb83013815 (diff) | |
| parent | 3d70f8c617a436c7146ecb81df2265b4626dfe89 (diff) | |
| download | olio-linux-3.10-edf8dde393f879fc2d8c22d4bc01ff8d37b80e1a.tar.xz olio-linux-3.10-edf8dde393f879fc2d8c22d4bc01ff8d37b80e1a.zip | |
Merge branch 'linus' into omap-for-v3.8/cleanup-headers-prepare-multiplatform-v3
Diffstat (limited to 'sound/core/oss/pcm_oss.c')
| -rw-r--r-- | sound/core/oss/pcm_oss.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 08fde0060fd..f337b66a020 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -2441,6 +2441,10 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file) mutex_unlock(&pcm->open_mutex); schedule(); mutex_lock(&pcm->open_mutex); + if (pcm->card->shutdown) { + err = -ENODEV; + break; + } if (signal_pending(current)) { err = -ERESTARTSYS; break; @@ -2457,6 +2461,8 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file) __error2: snd_card_file_remove(pcm->card, file); __error1: + if (pcm) + snd_card_unref(pcm->card); return err; } |