mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 08:01:12 +02:00
ALSA: hda: intel: 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. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260729083735.120219-4-tiwai@suse.de
This commit is contained in:
parent
bff808bc58
commit
f37eed135b
|
|
@ -2389,7 +2389,7 @@ static int azx_probe_continue(struct azx *chip)
|
|||
|
||||
#ifdef CONFIG_SND_HDA_PATCH_LOADER
|
||||
if (patch[dev] && *patch[dev]) {
|
||||
const struct firmware *fw = NULL;
|
||||
const struct firmware *fw __free(firmware) = NULL;
|
||||
|
||||
dev_info(&pci->dev, "Applying patch firmware '%s'\n",
|
||||
patch[dev]);
|
||||
|
|
@ -2398,7 +2398,6 @@ static int azx_probe_continue(struct azx *chip)
|
|||
"Cannot load firmware, continue without patching\n");
|
||||
} else {
|
||||
err = snd_hda_load_patch(&chip->bus, fw->size, fw->data);
|
||||
release_firmware(fw);
|
||||
if (err < 0)
|
||||
goto out_free;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user