soc/tegra: pmc: Avoid usage of uninitialized variable
authorThierry Reding <treding@nvidia.com>
Thu, 9 Jul 2015 07:59:55 +0000 (09:59 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 16 Jul 2015 08:38:20 +0000 (10:38 +0200)
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")
Cc: <stable@vger.kernel.org> # v4.0+
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/pmc.c

index 75d0457a77b72ade791df16e6193662028e35847..fa7036c4daf9c929cbd4d47f63590334c115457e 100644 (file)
@@ -736,12 +736,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)) {
This page took 0.04105 seconds and 5 git commands to generate.