From 4f40440ff580e145a35f04f9f0d1342a7587eec3 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 21 Feb 2008 12:40:00 +0100 Subject: [PATCH] --- yaml --- r: 92067 b: refs/heads/master c: c354cd7d9627930dcfbcff8355d422fa1bca948a h: refs/heads/master i: 92065: 6534bf429785622c33389bb5be79fd217737a25a 92063: 07a1c630aa61e28ad73f0bbbaba78ef17612f2b5 v: v3 --- [refs] | 2 +- trunk/sound/core/seq/oss/seq_oss_synth.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 5e5c66b2959b..556685cab162 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 87218e9c6e7f7908baf98030b6d724e14aa8b5cd +refs/heads/master: c354cd7d9627930dcfbcff8355d422fa1bca948a diff --git a/trunk/sound/core/seq/oss/seq_oss_synth.c b/trunk/sound/core/seq/oss/seq_oss_synth.c index ab570a0a6183..558dadbf45f1 100644 --- a/trunk/sound/core/seq/oss/seq_oss_synth.c +++ b/trunk/sound/core/seq/oss/seq_oss_synth.c @@ -245,8 +245,13 @@ snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp) info->nr_voices = rec->nr_voices; if (info->nr_voices > 0) { info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL); - if (!info->ch) - BUG(); + if (!info->ch) { + snd_printk(KERN_ERR "Cannot malloc\n"); + rec->oper.close(&info->arg); + module_put(rec->oper.owner); + snd_use_lock_free(&rec->use_lock); + continue; + } reset_channels(info); } debug_printk(("synth %d assigned\n", i));