ASoC: Fixes for v5.0
Quite a big batch of fixes here. There's a couple of things going on,
the main one is that we found some issues with not deferring probe when
we should, causing us to skip some driver initialization. The fixes for
this then in turn exposed some issues with how we were searching for
components which had previously gone unnoticed due to the original
There's also been the normal driver specific stuff and there's been what
looks like several batches of automated scanning for issues which have
generated quite a large set of smaller fixes for potential crashes and
missed error handling.
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
ASoC: amd: Fix potential NULL pointer dereference
Check return value from call to devm_kzalloc() in order to prevent a
potential NULL pointer dereference.
Also, notice that 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.
Lastly, improve the use of sizeof in the call to devm_kzalloc() by
changing it from sizeof(struct i2s_dev_data) to sizeof(*adata)
This issue was detected with the help of Coccinelle.
Fixes: ac289c7ec0bc ("ASoC: amd: add ACP3x PCM platform driver")
Signed-off-by: Gustavo A. R. Silva <email@example.com>
Signed-off-by: Mark Brown <firstname.lastname@example.org>
1 file changed