aboutsummaryrefslogtreecommitdiff
path: root/sound/core/oss/mixer_oss.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-08 14:36:18 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-17 13:19:06 -0800
commitf49c1beea97dfea9acb4a4dc213c12cf040b0280 (patch)
tree4ca913ba4762b838391732e11797afdc27acc727 /sound/core/oss/mixer_oss.c
parent7565b210845bb9c80836d32fcd6de5fb1bb90134 (diff)
ALSA: Fix card refcount unbalance
commit 8bb4d9ce08b0a92ca174e41d92c180328f86173f upstream. There are uncovered cases whether the card refcount introduced by the commit a0830dbd isn't properly increased or decreased: - OSS PCM and mixer success paths - When lookup function gets NULL This patch fixes these places. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=50251 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/core/oss/mixer_oss.c')
-rw-r--r--sound/core/oss/mixer_oss.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 05395aaeaa3..c353768854e 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -76,6 +76,7 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file)
snd_card_unref(card);
return -EFAULT;
}
+ snd_card_unref(card);
return 0;
}