summaryrefslogtreecommitdiffstats
path: root/sound/core/oss/pcm_oss.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-11-15 17:27:43 +0100
committerArnd Bergmann <arnd@arndb.de>2012-11-15 17:27:43 +0100
commit12480c2e53d355223cf6884ed1f56e6ac9b7c21f (patch)
treec244c5b4f265dc38f7658fbe5714ba2c402aef28 /sound/core/oss/pcm_oss.c
parent6c8e94a57c30e31d0807f038b4f98b659fd67776 (diff)
parent936407358759adb302df93ab61fa68141897270c (diff)
Merge tag 'omap-for-v3.8/fixes-non-critical-v4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical
From Tony Lindgren <tony@atomide.com>: Non critical omap fixes that were not considered urgent for the -rc cycle. * tag 'omap-for-v3.8/fixes-non-critical-v4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (645 commits) ARM: OMAP4: PM: fix errata handling when CONFIG_PM=n ARM: OMAP4: retrigger localtimers after re-enabling gic ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC control register change. ARM: OMAP4: PM: add errata support Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'sound/core/oss/pcm_oss.c')
-rw-r--r--sound/core/oss/pcm_oss.c6
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;
}