Re: [PATCH] ASoC: amd: move the call to devm_kzalloc below platform_get_resource()

2020-10-19 Thread Mark Brown
On Mon, Oct 19, 2020 at 08:31:29PM +0800, Defang Bo wrote: > Just as the commit <4cb79ef9c6c4>("ASoC: amd: Fix potential NULL pointer > dereference"),it makes no sense to allocate any resources if res = > platform_get_resource(pdev, IORESOURCE_MEM, 0); fails,so move the call to > devm_kzalloc()

[PATCH] ASoC: amd: move the call to devm_kzalloc below platform_get_resource()

2020-10-19 Thread Defang Bo
Just as the commit <4cb79ef9c6c4>("ASoC: amd: Fix potential NULL pointer dereference"),it makes no sense to allocate any resources if res = platform_get_resource(pdev, IORESOURCE_MEM, 0); fails,so move the call to devm_kzalloc() below the mentioned code. Signed-off-by: Defang Bo --- sound/soc