mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
ASoC: tlv320aic31xx: 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: Shenghao Ding <shenghao-ding@ti.com> Cc: Kevin Lu <kevin-lu@ti.com> Cc: Baojun Xu <baojun.xu@ti.com> Cc: Sen Wang <sen@ti.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260806140006.1412298-22-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
834c7c8511
commit
e420e87ddc
|
|
@ -1720,18 +1720,14 @@ static int tlv320dac3100_fw_load(struct aic31xx_priv *aic31xx,
|
|||
static int tlv320dac3100_load_coeffs(struct aic31xx_priv *aic31xx,
|
||||
const char *fw_name)
|
||||
{
|
||||
const struct firmware *fw;
|
||||
const struct firmware *fw __free(firmware) = NULL;
|
||||
int ret;
|
||||
|
||||
ret = request_firmware(&fw, fw_name, aic31xx->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = tlv320dac3100_fw_load(aic31xx, fw->data, fw->size);
|
||||
|
||||
release_firmware(fw);
|
||||
|
||||
return ret;
|
||||
return tlv320dac3100_fw_load(aic31xx, fw->data, fw->size);
|
||||
}
|
||||
|
||||
static int aic31xx_i2c_probe(struct i2c_client *i2c)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user