forked from luck/tmp_suning_uos_patched
ASoC: mediatek: mt8183: fix device_node leak
[ Upstream commit cb006006fe6221f092fadaffd3f219288304c9ad ] Fixes the device_node leak. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20211224064719.2031210-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f28672eef4
commit
ff08cf1e34
|
@ -787,7 +787,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
|
||||
|
|
|
@ -720,7 +720,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
|
||||
|
|
Loading…
Reference in New Issue
Block a user