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

2020-10-21 Thread Mark Brown
On Wed, Oct 21, 2020 at 03:04:27PM +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 > platform_get_resource fails,so move the call to devm_kzalloc() below the > mentioned code. As I

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

2020-10-21 Thread Defang Bo
Just as the commit <4cb79ef9c6c4>("ASoC: amd: Fix potential NULL pointer dereference"),it makes no sense to allocate any resources if platform_get_resource fails,so move the call to devm_kzalloc() below the mentioned code. Signed-off-by: Defang Bo --- sound/soc/amd/raven/acp3x-i2s.c | 2 ++ 1

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

2020-10-21 Thread Defang Bo
Just as the commit <4cb79ef9c6c4>("ASoC: amd: Fix potential NULL pointer dereference"),it makes no sense to allocate any resources if platform_get_resource fails,so move the call to devm_kzalloc() below the mentioned code. Signed-off-by: Defang Bo --- sound/soc/amd/raven/acp3x-i2s.c | 2 ++ 1