summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-12-19 15:23:13 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-24 09:32:09 +0200
commit4a12b4e2bb49518eba08bf269df8f8d0bb163e55 (patch)
tree5207e632989960e95e9a9087e37ac967cc7c4f5f /sound/core
parent4533f7e1785faab49c867ae19bf00840fe351b0c (diff)
downloadlinux-stable-4a12b4e2bb49518eba08bf269df8f8d0bb163e55.tar.gz
linux-stable-4a12b4e2bb49518eba08bf269df8f8d0bb163e55.tar.bz2
linux-stable-4a12b4e2bb49518eba08bf269df8f8d0bb163e55.zip
ALSA: oss: consolidate kmalloc/memset 0 call to kzalloc
commit 46325371b230cc66c743925c930a17e7d0b8211e upstream. This is an API consolidation only. The use of kmalloc + memset to 0 is equivalent to kzalloc. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/oss/pcm_oss.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 6cd8aec146f2..672f3acfca0b 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -853,7 +853,7 @@ static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream,
return -EAGAIN;
} else if (mutex_lock_interruptible(&runtime->oss.params_lock))
return -EINTR;
- sw_params = kmalloc(sizeof(*sw_params), GFP_KERNEL);
+ sw_params = kzalloc(sizeof(*sw_params), GFP_KERNEL);
params = kmalloc(sizeof(*params), GFP_KERNEL);
sparams = kmalloc(sizeof(*sparams), GFP_KERNEL);
if (!sw_params || !params || !sparams) {
@@ -991,7 +991,6 @@ static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream,
goto failure;
}
- memset(sw_params, 0, sizeof(*sw_params));
if (runtime->oss.trigger) {
sw_params->start_threshold = 1;
} else {