Skip to content
Commit 8eae6c25 authored by Douglas Anderson's avatar Douglas Anderson Committed by Mark Brown
Browse files

ASoC: rockchip: Allocate enough memory so we don't overflow routes



In the recent commit d9f9c167 ("ASoC: rockchip: Init dapm routes
dynamically") we improperly allocated memory for the card->dapm_routes
causing us to overflow the allocation on every boot.  Oops.

Let's allocate the correct amount of memory.  We'll also add a check
to make sure that we don't overrun memory even if we encounter some
sort of weird device tree.

Fixes: d9f9c167 ("ASoC: rockchip: Init dapm routes dynamically")
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7e0dc9ae
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment