Commit cb006006 authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Mark Brown

ASoC: mediatek: mt8183: fix device_node leak

Fixes the device_node leak.
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20211224064719.2031210-3-tzungbi@google.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 49343378
......@@ -781,7 +781,11 @@ static int mt8183_da7219_max98357_dev_probe(struct platform_device *pdev)
return ret;
}
return devm_snd_soc_register_card(&pdev->dev, card);
ret = devm_snd_soc_register_card(&pdev->dev, card);
of_node_put(platform_node);
of_node_put(hdmi_codec);
return ret;
}
#ifdef CONFIG_OF
......
......@@ -780,7 +780,12 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev)
__func__, ret);
}
return devm_snd_soc_register_card(&pdev->dev, card);
ret = devm_snd_soc_register_card(&pdev->dev, card);
of_node_put(platform_node);
of_node_put(ec_codec);
of_node_put(hdmi_codec);
return ret;
}
#ifdef CONFIG_OF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment