mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
[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>
This commit is contained in:
parent
87218e9c6e
commit
c354cd7d96
@ -245,8 +245,13 @@ snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp)
|
|||||||
info->nr_voices = rec->nr_voices;
|
info->nr_voices = rec->nr_voices;
|
||||||
if (info->nr_voices > 0) {
|
if (info->nr_voices > 0) {
|
||||||
info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL);
|
info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL);
|
||||||
if (!info->ch)
|
if (!info->ch) {
|
||||||
BUG();
|
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);
|
reset_channels(info);
|
||||||
}
|
}
|
||||||
debug_printk(("synth %d assigned\n", i));
|
debug_printk(("synth %d assigned\n", i));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user