aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-09-04 20:23:29 +0200
committerTakashi Iwai <tiwai@suse.de>2018-09-04 20:23:40 +0200
commit70f7922c25cfb4cc7757f0964919d7d87e2ba250 (patch)
tree502b13ee7e9c764363da1a7353f7d948e11df691 /sound/core
parentALSA: aoa: Convert to using %pOFn instead of device_node.name (diff)
parentALSA: mips: Cleanup indirect PCM helper usages (diff)
downloadlinux-dev-70f7922c25cfb4cc7757f0964919d7d87e2ba250.tar.xz
linux-dev-70f7922c25cfb4cc7757f0964919d7d87e2ba250.zip
Merge branch 'topic/pcm-indirect-fixes' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/rawmidi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 69517e18ef07..08d5662039e3 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -129,7 +129,7 @@ static int snd_rawmidi_runtime_create(struct snd_rawmidi_substream *substream)
runtime->avail = 0;
else
runtime->avail = runtime->buffer_size;
- runtime->buffer = kvmalloc(runtime->buffer_size, GFP_KERNEL);
+ runtime->buffer = kvzalloc(runtime->buffer_size, GFP_KERNEL);
if (!runtime->buffer) {
kfree(runtime);
return -ENOMEM;
@@ -655,7 +655,7 @@ static int resize_runtime_buffer(struct snd_rawmidi_runtime *runtime,
if (params->avail_min < 1 || params->avail_min > params->buffer_size)
return -EINVAL;
if (params->buffer_size != runtime->buffer_size) {
- newbuf = kvmalloc(params->buffer_size, GFP_KERNEL);
+ newbuf = kvzalloc(params->buffer_size, GFP_KERNEL);
if (!newbuf)
return -ENOMEM;
spin_lock_irq(&runtime->lock);