diff options
author | Thierry Reding <treding@nvidia.com> | 2015-07-09 09:59:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-21 10:05:43 -0700 |
commit | 72cdf324731e08faebd16a6a281872f6f7d8fcb2 (patch) | |
tree | 2fa0cb8927b9bf2fbbfcf01f28f6d99a20ccbc88 /drivers/soc | |
parent | e4b09a61e9b1eb200f300cdc21d146dbdc4014ca (diff) |
soc/tegra: pmc: Avoid usage of uninitialized variable
commit 95169cd23bfa88003f8be06234dbd65f5737add0 upstream.
Make sure to only drop the reference to the OF node after it's been
successfully obtained.
Fixes: 3568df3d31d6 ("soc: tegra: Add thermal reset (thermtrip) support to PMC")
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/tegra/pmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index c956395cf46f..c89bada875f8 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -732,12 +732,12 @@ void tegra_pmc_init_tsense_reset(struct tegra_pmc *pmc) u32 value, checksum; if (!pmc->soc->has_tsense_reset) - goto out; + return; np = of_find_node_by_name(pmc->dev->of_node, "i2c-thermtrip"); if (!np) { 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)) { |