From patchwork Mon Sep 21 16:31:07 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: 309399 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 B8519C43466 for ; Mon, 21 Sep 2020 16:50:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 608382395C for ; Mon, 21 Sep 2020 16:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600707013; bh=CZh8RPqswjviyEN5jt4B+U9jLib2epKqAgVrpbhD7pM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QwloKlrnR4A3BeIH18Pp4eaAfuh+Uq8+eGptF19dzFHTvSQ9dGU0WcC3qlUCDfmns 8lLurScJi78z5KUTodTDuaUdEcyqYIlgwCy92HsX57MJXtLzrD4LTkpwq9AdCZ+tAS NkNnWpFEI/N2cdzUXLaKS8hjkW3VwsRJUhtfKqyM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729975AbgIUQuL (ORCPT ); Mon, 21 Sep 2020 12:50:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:58292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729970AbgIUQuB (ORCPT ); Mon, 21 Sep 2020 12:50:01 -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 0C85F20874; Mon, 21 Sep 2020 16:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600707000; bh=CZh8RPqswjviyEN5jt4B+U9jLib2epKqAgVrpbhD7pM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NSmWjAbik2P/Q7v3K9vg/Sd3GiBNXKX2LEcge2vc1CeS2fiMbuv0ni3JHqQu4NhTE jy/Khm0K4pkdj/P0WPG2vZmas8tSxMZgOHZVXv1BoBFAZ/0IX8ADQD/81b9mHEUsKS OfEEV6RQ5gruAXyxUNHioGkPHhv3AzoCZ0/OrmrY= 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 5.4 28/72] clk: davinci: Use the correct size when allocating memory Date: Mon, 21 Sep 2020 18:31:07 +0200 Message-Id: <20200921163123.206646502@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921163121.870386357@linuxfoundation.org> References: <20200921163121.870386357@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 1ac11b6a47a37..2ec48d030fda7 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;