diff options
| -rw-r--r-- | sound/core/rawmidi.c | 4 |
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) | |||
| 129 | runtime->avail = 0; | 129 | runtime->avail = 0; |
| 130 | else | 130 | else |
| 131 | runtime->avail = runtime->buffer_size; | 131 | runtime->avail = runtime->buffer_size; |
| 132 | runtime->buffer = kvmalloc(runtime->buffer_size, GFP_KERNEL); | 132 | runtime->buffer = kvzalloc(runtime->buffer_size, GFP_KERNEL); |
| 133 | if (!runtime->buffer) { | 133 | if (!runtime->buffer) { |
| 134 | kfree(runtime); | 134 | kfree(runtime); |
| 135 | return -ENOMEM; | 135 | return -ENOMEM; |
| @@ -655,7 +655,7 @@ static int resize_runtime_buffer(struct snd_rawmidi_runtime *runtime, | |||
| 655 | if (params->avail_min < 1 || params->avail_min > params->buffer_size) | 655 | if (params->avail_min < 1 || params->avail_min > params->buffer_size) |
| 656 | return -EINVAL; | 656 | return -EINVAL; |
| 657 | if (params->buffer_size != runtime->buffer_size) { | 657 | if (params->buffer_size != runtime->buffer_size) { |
| 658 | newbuf = kvmalloc(params->buffer_size, GFP_KERNEL); | 658 | newbuf = kvzalloc(params->buffer_size, GFP_KERNEL); |
| 659 | if (!newbuf) | 659 | if (!newbuf) |
| 660 | return -ENOMEM; | 660 | return -ENOMEM; |
| 661 | spin_lock_irq(&runtime->lock); | 661 | spin_lock_irq(&runtime->lock); |
