diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-02-21 06:40:00 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:14 -0400 |
commit | c354cd7d9627930dcfbcff8355d422fa1bca948a (patch) | |
tree | e94caf91832efab42b1c0ff9e67ae10e543723f8 /sound/core/seq | |
parent | 87218e9c6e7f7908baf98030b6d724e14aa8b5cd (diff) |
[ALSA] seq-oss - Remove invalid BUG()
Removed invalid BUG() - the driver should handle the error case properly
rather than issuing BUG().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq')
-rw-r--r-- | sound/core/seq/oss/seq_oss_synth.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index ab570a0a6183..558dadbf45f1 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c | |||
@@ -245,8 +245,13 @@ snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp) | |||
245 | info->nr_voices = rec->nr_voices; | 245 | info->nr_voices = rec->nr_voices; |
246 | if (info->nr_voices > 0) { | 246 | if (info->nr_voices > 0) { |
247 | info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL); | 247 | info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL); |
248 | if (!info->ch) | 248 | if (!info->ch) { |
249 | BUG(); | 249 | snd_printk(KERN_ERR "Cannot malloc\n"); |
250 | rec->oper.close(&info->arg); | ||
251 | module_put(rec->oper.owner); | ||
252 | snd_use_lock_free(&rec->use_lock); | ||
253 | continue; | ||
254 | } | ||
250 | reset_channels(info); | 255 | reset_channels(info); |
251 | } | 256 | } |
252 | debug_printk(("synth %d assigned\n", i)); | 257 | debug_printk(("synth %d assigned\n", i)); |