Unverified Commit 49ef6491 authored by Fedor Pchelkin's avatar Fedor Pchelkin Committed by Stephen Boyd
Browse files

clk: tegra: do not overallocate memory for bpmp clocks



struct tegra_bpmp::clocks is a pointer to a dynamically allocated array
of pointers to 'struct tegra_bpmp_clk'.

But the size of the allocated area is calculated like it is an array
containing actual 'struct tegra_bpmp_clk' objects - it's not true, there
are just pointers.

Found by Linux Verification Center (linuxtesting.org) with Svace static
analysis tool.

Fixes: 2db12b15 ("clk: tegra: Register clocks from root to leaf")
Signed-off-by: default avatarFedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 41bba997
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment