提交 95169cd2 编写于 作者: T Thierry Reding

soc/tegra: pmc: Avoid usage of uninitialized variable

Make sure to only drop the reference to the OF node after it's been
successfully obtained.

Fixes: 3568df3d ("soc: tegra: Add thermal reset (thermtrip) support to PMC")
Cc: <stable@vger.kernel.org> # v4.0+
Reviewed-by: NMikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 3a369982
...@@ -736,12 +736,12 @@ void tegra_pmc_init_tsense_reset(struct tegra_pmc *pmc) ...@@ -736,12 +736,12 @@ void tegra_pmc_init_tsense_reset(struct tegra_pmc *pmc)
u32 value, checksum; u32 value, checksum;
if (!pmc->soc->has_tsense_reset) if (!pmc->soc->has_tsense_reset)
goto out; return;
np = of_find_node_by_name(pmc->dev->of_node, "i2c-thermtrip"); np = of_find_node_by_name(pmc->dev->of_node, "i2c-thermtrip");
if (!np) { if (!np) {
dev_warn(dev, "i2c-thermtrip node not found, %s.\n", disabled); dev_warn(dev, "i2c-thermtrip node not found, %s.\n", disabled);
goto out; return;
} }
if (of_property_read_u32(np, "nvidia,i2c-controller-id", &ctrl_id)) { if (of_property_read_u32(np, "nvidia,i2c-controller-id", &ctrl_id)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册