Skip to content

Commit

Permalink
[ALSA] seq-oss - Remove invalid BUG()
Browse files Browse the repository at this point in the history
Removed invalid BUG() - the driver should handle the error case properly
rather than issuing BUG().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Apr 24, 2008
1 parent 87218e9 commit c354cd7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sound/core/seq/oss/seq_oss_synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit c354cd7

Please sign in to comment.