ALSA: Fix card refcount unbalance
authorTakashi Iwai <tiwai@suse.de>
Thu, 8 Nov 2012 13:36:18 +0000 (14:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Nov 2012 21:14:26 +0000 (13:14 -0800)
commitaaf238baf31e14cb1c111815193c3a78770b1873
tree36c89b47364c470c7cbafbade2220d5c68a4ccc2
parent919609d3cba52431b16501a63e6a5d45266a25c6
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>
sound/core/oss/mixer_oss.c
sound/core/oss/pcm_oss.c
sound/core/pcm_native.c
sound/core/sound.c
sound/core/sound_oss.c