If we encounter an error after the kfree(acpi_hw_cfg); then the goto
err; will result in a double free.
Fixes: 6c4ddfa8b93f ("ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220111072232.GG11243@kili
Signed-off-by: Takashi Iwai <tiwai@suse.de>
if (ret)
goto err;
kfree(acpi_hw_cfg);
+ acpi_hw_cfg = NULL;
if (cs35l41->reg_seq->probe) {
ret = regmap_register_patch(cs35l41->regmap, cs35l41->reg_seq->probe,