mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2025-04-19 20:58:31 +09:00
ASoC: Intel: avs: Fix null-ptr-deref in avs_component_probe()
devm_kasprintf() returns NULL when memory allocation fails. Currently, avs_component_probe() does not check for this case, which results in a NULL pointer dereference. Fixes: 739c031110da ("ASoC: Intel: avs: Provide support for fallback topology") Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Ethan Carter Edwards <ethan@ethancedwards.com> Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com> Link: https://patch.msgid.link/20250402141411.44972-1-bsdhenrymartin@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ef5c23ae9a
commit
95f723cf14
@ -927,7 +927,8 @@ static int avs_component_probe(struct snd_soc_component *component)
|
||||
else
|
||||
mach->tplg_filename = devm_kasprintf(adev->dev, GFP_KERNEL,
|
||||
"hda-generic-tplg.bin");
|
||||
|
||||
if (!mach->tplg_filename)
|
||||
return -ENOMEM;
|
||||
filename = kasprintf(GFP_KERNEL, "%s/%s", component->driver->topology_name_prefix,
|
||||
mach->tplg_filename);
|
||||
if (!filename)
|
||||
|
Loading…
x
Reference in New Issue
Block a user