[PATCH 03/14] ALSA: hda: intel: Use auto-cleanup for firmware loading
Takashi Iwai <[email protected]>
| Newsgroups | org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- sound/hda/controllers/intel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/hda/controllers/intel.c b/sound/hda/controllers/intel.c index 192f5c044b7a..dbcdaf12a4bf 100644 --- a/sound/hda/controllers/intel.c +++ b/sound/hda/controllers/intel.c @@ -2387,7 +2387,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]); @@ -2396,7 +2396,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; } -- 2.55.0