[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZMJZzfqBxRNSeLxc@corigine.com>
Date: Thu, 27 Jul 2023 13:49:33 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Thierry Reding <thierry.reding@...il.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Jon Hunter <jonathanh@...dia.com>,
Revanth Kumar Uppala <ruppala@...dia.com>,
Bhadram Varka <vbhadram@...dia.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org,
linux-tegra@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH] net: stmmac: tegra: Properly allocate clock bulk data
On Wed, Jul 26, 2023 at 06:32:00PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@...dia.com>
+ Revanth Kumar Uppala <ruppala@...dia.com>,
Bhadram Varka <vbhadram@...dia.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
linux-arm-kernel@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com
As per the output of
./scripts/get_maintainer.pl --git-min-percent 25 this.patch
which is the preferred method to determine the CC list for
Networking patches.
> The clock data is an array of struct clk_bulk_data, so make sure to
> allocate enough memory.
>
> Fixes: d8ca113724e7 ("net: stmmac: tegra: Add MGBE support")
> Signed-off-by: Thierry Reding <treding@...dia.com>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
> index 99e2e5a5cd60..78a492b91bc6 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
> @@ -234,7 +234,8 @@ static int tegra_mgbe_probe(struct platform_device *pdev)
> res.addr = mgbe->regs;
> res.irq = irq;
>
> - mgbe->clks = devm_kzalloc(&pdev->dev, sizeof(*mgbe->clks), GFP_KERNEL);
> + mgbe->clks = devm_kcalloc(&pdev->dev, ARRAY_SIZE(mgbe_clks),
> + sizeof(*mgbe->clks), GFP_KERNEL);
> if (!mgbe->clks)
> return -ENOMEM;
>
> --
> 2.41.0
>
>
Powered by blists - more mailing lists