mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 15:40:03 +02:00
ASoC: renesas: 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/20260806140006.1412298-30-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c566377097
commit
81ab987169
|
|
@ -715,7 +715,6 @@ static struct snd_soc_dai_driver siu_i2s_dai = {
|
|||
|
||||
static int siu_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct firmware *fw_entry;
|
||||
struct resource *res, *region;
|
||||
struct siu_info *info;
|
||||
int ret;
|
||||
|
|
@ -726,6 +725,7 @@ static int siu_probe(struct platform_device *pdev)
|
|||
siu_i2s_data = info;
|
||||
info->dev = &pdev->dev;
|
||||
|
||||
const struct firmware *fw_entry __free(firmware) = NULL;
|
||||
ret = request_firmware(&fw_entry, "siu_spb.bin", &pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
@ -736,8 +736,6 @@ static int siu_probe(struct platform_device *pdev)
|
|||
*/
|
||||
memcpy(&info->fw, fw_entry->data, fw_entry->size);
|
||||
|
||||
release_firmware(fw_entry);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res)
|
||||
return -ENODEV;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user