Re: [PATCH v2] ASoC: amd: change clk_get() to devm_clk_get() and add missed checks

2020-12-08 Thread Mark Brown
On Fri, 4 Dec 2020 14:36:10 +0800, Chuhong Yuan wrote: > 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 af

[PATCH v2] ASoC: amd: change clk_get() to devm_clk_get() and add missed checks

2020-12-03 Thread Chuhong Yuan
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: bb24a31ed584 ("ASoC: AMD: Configure wclk an