aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/oss/mixer_oss.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-11-12 22:18:43 +0100
committerArnd Bergmann <arnd@arndb.de>2012-11-13 10:14:38 +0100
commitb5932cc839d809a07a43b93555ccc3fbabc2a766 (patch)
tree528d7a0b3353c08ec7461dee80d7d3151061dc07 /sound/core/oss/mixer_oss.c
parentMerge tag 'davinci-for-v3.8/cleanup' of git://gitorious.org/linux-davinci/linux-davinci into next/cleanup (diff)
parentARM: dma-mapping: remove init_consistent_dma_size() stub (diff)
downloadlinux-dev-b5932cc839d809a07a43b93555ccc3fbabc2a766.tar.xz
linux-dev-b5932cc839d809a07a43b93555ccc3fbabc2a766.zip
Merge branch 'cleanups/dma' into next/cleanup
Separate patches from Marek Szyprowski <m.szyprowski@samsung.com>: Commit e9da6e9905e639b0 ("ARM: dma-mapping: remove custom consistent dma region") replaced custom consistent memory handling, so setting consistent dma memory size is not longer required. This patch series cleans sub-architecture platform code to remove all calls to the obsolated init_consistent_dma_size() function and finally removes the init_consistent_dma_size() stub itself. * cleanups/dma: ARM: at91: remove obsoleted init_consistent_dma_size() ARM: u300: remove obsoleted init_consistent_dma_size() ARM: dma-mapping: remove init_consistent_dma_size() stub ARM: shmobile: remove obsoleted init_consistent_dma_size() ARM: davinci: remove obsoleted init_consistent_dma_size() ARM: samsung: remove obsoleted init_consistent_dma_size() Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'sound/core/oss/mixer_oss.c')
-rw-r--r--sound/core/oss/mixer_oss.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 29f6ded02555..e8a1d18774b2 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -52,14 +52,19 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file)
SNDRV_OSS_DEVICE_TYPE_MIXER);
if (card == NULL)
return -ENODEV;
- if (card->mixer_oss == NULL)
+ if (card->mixer_oss == NULL) {
+ snd_card_unref(card);
return -ENODEV;
+ }
err = snd_card_file_add(card, file);
- if (err < 0)
+ if (err < 0) {
+ snd_card_unref(card);
return err;
+ }
fmixer = kzalloc(sizeof(*fmixer), GFP_KERNEL);
if (fmixer == NULL) {
snd_card_file_remove(card, file);
+ snd_card_unref(card);
return -ENOMEM;
}
fmixer->card = card;
@@ -68,8 +73,10 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file)
if (!try_module_get(card->module)) {
kfree(fmixer);
snd_card_file_remove(card, file);
+ snd_card_unref(card);
return -EFAULT;
}
+ snd_card_unref(card);
return 0;
}