From: Nicholas Mc Guire Date: Sat, 19 Dec 2015 14:23:13 +0000 (+0100) Subject: ALSA: oss: consolidate kmalloc/memset 0 call to kzalloc X-Git-Tag: v4.1.52~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ef1bdb4d645d4778e36ad85ce66f2e1d6b8c06a;p=thirdparty%2Fkernel%2Fstable.git ALSA: oss: consolidate kmalloc/memset 0 call to kzalloc [ Upstream commit 46325371b230cc66c743925c930a17e7d0b8211e ] This is an API consolidation only. The use of kmalloc + memset to 0 is equivalent to kzalloc. Signed-off-by: Nicholas Mc Guire Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index daa1feac66bf7..001f4526be8d9 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 {