mirror of
https://github.com/torvalds/linux.git
synced 2026-10-12 13:27:02 +02:00
ASoC: hdac_hda: Use auto-cleanup for firmware loading
Simplify the code to manage the firmware loading with __free(firmware) auto-cleanup. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-9-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
aec8a1e14a
commit
a57beee8f8
|
|
@ -437,7 +437,7 @@ static int hdac_hda_codec_probe(struct snd_soc_component *component)
|
|||
|
||||
#ifdef CONFIG_SND_HDA_PATCH_LOADER
|
||||
if (loadable_patch[hda_pvt->dev_index] && *loadable_patch[hda_pvt->dev_index]) {
|
||||
const struct firmware *fw;
|
||||
const struct firmware *fw __free(firmware) = NULL;
|
||||
|
||||
dev_info(&hdev->dev, "Applying patch firmware '%s'\n",
|
||||
loadable_patch[hda_pvt->dev_index]);
|
||||
|
|
@ -451,7 +451,6 @@ static int hdac_hda_codec_probe(struct snd_soc_component *component)
|
|||
dev_err(&hdev->dev, "%s: failed to load hda patch %d\n", __func__, ret);
|
||||
goto error_no_pm;
|
||||
}
|
||||
release_firmware(fw);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user