提交 0be51680 编写于 作者: T Takashi Iwai

ALSA: cmipci: Allocate with GFP_KERNEL instead of GFP_ATOMIC

save_mixer_state() is called in a sleepable context, so it's safe to
allocate with GFP_KERNEL instead of the current GFP_ATOMIC.  The
GFP_ATOMIC usage must have been based on an incorrect assumption in
the very old code base.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 1fa350b6
...@@ -1139,7 +1139,7 @@ static int save_mixer_state(struct cmipci *cm) ...@@ -1139,7 +1139,7 @@ static int save_mixer_state(struct cmipci *cm)
struct snd_ctl_elem_value *val; struct snd_ctl_elem_value *val;
unsigned int i; unsigned int i;
val = kmalloc(sizeof(*val), GFP_ATOMIC); val = kmalloc(sizeof(*val), GFP_KERNEL);
if (!val) if (!val)
return -ENOMEM; return -ENOMEM;
for (i = 0; i < CM_SAVED_MIXERS; i++) { for (i = 0; i < CM_SAVED_MIXERS; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册