Received: by 10.192.165.148 with SMTP id m20csp2451151imm; Sun, 22 Apr 2018 07:19:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+LitjLzhu3aMnvwKw0OXg7S1ejcfP8Z7WcDzT4ctuAljDpS6ui6QDONRNGU0P3zPWZIWYb X-Received: by 2002:a17:902:7249:: with SMTP id c9-v6mr17595016pll.217.1524406765126; Sun, 22 Apr 2018 07:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524406765; cv=none; d=google.com; s=arc-20160816; b=tankeQE25xwUd3vDaelUvjRTIDGQetmfw9zs1UIaCEbSzaGqmDERZUNeQjEHH5v2oX wGGB9eeSQDou80Gw8eLrbWmfmBlwoW4ZzcQlhe0E02iOh3ocDWl8jsSC03hukYZqN6tM I9VTE+t1w8mNz5RhaAs9g8YpRNg1/UNzp6rIdzulQLTOEi/RPCA8IORr1Sc7TXX59VP7 4+o5M47NQcmCbMnpI58EMLx/HWW0ROqNBM6rOI+PwiMJDUq3IsoPWE+5oJkJQ21ak1ln uLCXNq1w6oKUTKKK6pkfte5xSnyqgUNfa0NOa4w0fEO7C26RbilnR2Cp/y/RuTzdCPpH bM1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=yfcdhMvFbMEVLPWUadKwR2zzfsC3vx8SNhLK851DzcQ=; b=O1ocvnfPTHmCSORyF4TIr+r/OyHQW3opBJjlt1FMgXG6m6+dm9FYU6pSu7OaVsoXzq IqdMe/9yJpEPyhxuAUcEH3Pg+3qylJSrQyJilAPQP5yfP6s64zjdzOL67Vy+N6MJgRqO ujTwNBXWCQUh0ndI7HhOvJNVFkGMmF5UfEGRt5zkHoBpatnjP7qd9mx/OvrwbLSQWc15 ZOdWrVXYTWJ7Tj2qZji5G5YUp/UR0yxng6TjNx/pcGa8uRlHMSduEtPoMZZQ8UcgwPGC TRAg5FhqXohyMeXP6ItDsLxOXPdumiArv1qynoJf7/VP430RJjP02PYR2Z55CRLqO4wG crJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q24si9061116pff.13.2018.04.22.07.19.11; Sun, 22 Apr 2018 07:19:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757212AbeDVOSL (ORCPT + 99 others); Sun, 22 Apr 2018 10:18:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58732 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757191AbeDVOSH (ORCPT ); Sun, 22 Apr 2018 10:18:07 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F2B1BCF5; Sun, 22 Apr 2018 14:18:05 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Mc Guire , Takashi Iwai Subject: [PATCH 4.4 65/97] ALSA: oss: consolidate kmalloc/memset 0 call to kzalloc Date: Sun, 22 Apr 2018 15:53:43 +0200 Message-Id: <20180422135308.843923639@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135304.577223025@linuxfoundation.org> References: <20180422135304.577223025@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nicholas Mc Guire 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 Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/core/oss/pcm_oss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- 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(str 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(str goto failure; } - memset(sw_params, 0, sizeof(*sw_params)); if (runtime->oss.trigger) { sw_params->start_threshold = 1; } else {