diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-04-09 16:09:27 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-04-16 08:01:31 -0400 |
commit | 0be5168047c22ad6b2fa675f02e8090b192fbc8f (patch) | |
tree | b7d7d5705e01b8c9cbde21fa8e6c072e18c7f5ae | |
parent | 1fa350b6e1a14edaeeb4e4f84010f5b0c53d2915 (diff) |
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: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/cmipci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 26a657870664..452cc79b44af 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -1139,7 +1139,7 @@ static int save_mixer_state(struct cmipci *cm) | |||
1139 | struct snd_ctl_elem_value *val; | 1139 | struct snd_ctl_elem_value *val; |
1140 | unsigned int i; | 1140 | unsigned int i; |
1141 | 1141 | ||
1142 | val = kmalloc(sizeof(*val), GFP_ATOMIC); | 1142 | val = kmalloc(sizeof(*val), GFP_KERNEL); |
1143 | if (!val) | 1143 | if (!val) |
1144 | return -ENOMEM; | 1144 | return -ENOMEM; |
1145 | for (i = 0; i < CM_SAVED_MIXERS; i++) { | 1145 | for (i = 0; i < CM_SAVED_MIXERS; i++) { |