diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-04-22 04:38:26 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-04-22 04:40:29 -0400 |
commit | 47966e977952856f184c93c4ae5da11e151cb4a3 (patch) | |
tree | 12c4ffd8df9e3300e510faf54131404a780dee2b /sound/core/compress_offload.c | |
parent | 1c62e9f2b5a97c53aaae490f844949d32cca6dc6 (diff) |
ALSA: compress: Use kzalloc() for ioctls writing back data
Like the previous patch by Dan, we should clear the data to be
returned from certain compress ioctls, namely,
snd_compr_get_codec_caps() and snd_compr_get_params().
This time, we can simply replace kmalloc() with kzalloc().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/compress_offload.c')
-rw-r--r-- | sound/core/compress_offload.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 664c69398b41..a0bc47f8dcf7 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c | |||
@@ -428,7 +428,7 @@ snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg) | |||
428 | if (!stream->ops->get_codec_caps) | 428 | if (!stream->ops->get_codec_caps) |
429 | return -ENXIO; | 429 | return -ENXIO; |
430 | 430 | ||
431 | caps = kmalloc(sizeof(*caps), GFP_KERNEL); | 431 | caps = kzalloc(sizeof(*caps), GFP_KERNEL); |
432 | if (!caps) | 432 | if (!caps) |
433 | return -ENOMEM; | 433 | return -ENOMEM; |
434 | 434 | ||
@@ -545,7 +545,7 @@ snd_compr_get_params(struct snd_compr_stream *stream, unsigned long arg) | |||
545 | if (!stream->ops->get_params) | 545 | if (!stream->ops->get_params) |
546 | return -EBADFD; | 546 | return -EBADFD; |
547 | 547 | ||
548 | params = kmalloc(sizeof(*params), GFP_KERNEL); | 548 | params = kzalloc(sizeof(*params), GFP_KERNEL); |
549 | if (!params) | 549 | if (!params) |
550 | return -ENOMEM; | 550 | return -ENOMEM; |
551 | retval = stream->ops->get_params(stream, params); | 551 | retval = stream->ops->get_params(stream, params); |