mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 08:01:12 +02:00
ASoC: Intel: avs: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Only the code refactoring, no functional changes. Cc: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-27-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
997261a59b
commit
6a052cf54f
|
|
@ -2222,7 +2222,7 @@ struct avs_tplg *avs_tplg_new(struct snd_soc_component *comp)
|
|||
|
||||
int avs_load_topology(struct snd_soc_component *comp, const char *filename)
|
||||
{
|
||||
const struct firmware *fw;
|
||||
const struct firmware *fw __free(firmware) = NULL;
|
||||
int ret;
|
||||
|
||||
ret = request_firmware(&fw, filename, comp->dev);
|
||||
|
|
@ -2235,7 +2235,6 @@ int avs_load_topology(struct snd_soc_component *comp, const char *filename)
|
|||
if (ret < 0)
|
||||
dev_err(comp->dev, "load topology \"%s\" failed: %d\n", filename, ret);
|
||||
|
||||
release_firmware(fw);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user