Skip to content
Unverified Commit 95d3befb authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Mark Brown
Browse files

ASoC: amd: change clk_get() to devm_clk_get() and add missed checks



cz_da7219_init() does not check the return values of clk_get(),
while da7219_clk_enable() calls clk_set_rate() to dereference
the pointers.
Add checks to fix the problems.
Also, change clk_get() to devm_clk_get() to avoid data leak after
failures.

Fixes: bb24a31e ("ASoC: AMD: Configure wclk and bclk of master codec")
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20201204063610.513556-1-hslester96@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0d024a8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment