From patchwork Mon Sep 21 16:28:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 263704 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B994C43466 for ; Mon, 21 Sep 2020 16:41:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5223A239D3 for ; Mon, 21 Sep 2020 16:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706508; bh=MlW8wP7YSPkTk34orQp0KO224TajDrzSOTXPip8C5mM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=z1OCP6IoAKGlE3or4BjWD+2UKF+33AjkZExN8uuK10sPborCazc7deT1YlgjfPUKz 6j92h5+2MC9jvTjFC/dsKJRVqtqiuqt5N6YRwvkcLI5OiNaWsRjTr8l5xdzed0AZ/S x/5ZwxC4sNJwQkB2402odTXX6yqBZCZsNAi7rRAM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728662AbgIUQlr (ORCPT ); Mon, 21 Sep 2020 12:41:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:45094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729422AbgIUQla (ORCPT ); Mon, 21 Sep 2020 12:41:30 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5B6C0239D0; Mon, 21 Sep 2020 16:41:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706489; bh=MlW8wP7YSPkTk34orQp0KO224TajDrzSOTXPip8C5mM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mktxxM4Q9O6++7XXudYSHWEJXRwlG8PCqPTh0BKMTRi32JU0sHztstrsrduTcpecO fOpqRqiwD2FSR/WI2G53EfcUwwk4NjJvaN4YTWK7ZkvwFmu9lCHEPm5jkKtU+xuXPO HM7M8SZXAhvE7Nbjk4R2i2gp1c8xiKPqt/UGdJ0g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , David Lechner , Stephen Boyd , Sasha Levin Subject: [PATCH 4.19 26/49] clk: davinci: Use the correct size when allocating memory Date: Mon, 21 Sep 2020 18:28:10 +0200 Message-Id: <20200921162035.812003433@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162034.660953761@linuxfoundation.org> References: <20200921162034.660953761@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Christophe JAILLET [ Upstream commit 3dabfa2bda48dab717986609762ce2a49335eb99 ] 'sizeof(*pllen)' should be used in place of 'sizeof(*pllout)' to avoid a small over-allocation. Fixes: 2d1726915159 ("clk: davinci: New driver for davinci PLL clocks") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200809144959.747986-1-christophe.jaillet@wanadoo.fr Reviewed-by: David Lechner Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/davinci/pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/davinci/pll.c b/drivers/clk/davinci/pll.c index 1c99e992d6388..796b428998ae0 100644 --- a/drivers/clk/davinci/pll.c +++ b/drivers/clk/davinci/pll.c @@ -491,7 +491,7 @@ struct clk *davinci_pll_clk_register(struct device *dev, parent_name = postdiv_name; } - pllen = kzalloc(sizeof(*pllout), GFP_KERNEL); + pllen = kzalloc(sizeof(*pllen), GFP_KERNEL); if (!pllen) { ret = -ENOMEM; goto err_unregister_postdiv;