ARM: tegra: temp sensor: fix error handler
Colin Patrick McCabe [Wed, 26 Oct 2011 23:08:40 +0000 (16:08 -0700)]
Change-Id: Ie730ad7ec74927ef63722f4038db00e5f5d31154
Signed-off-by: Colin Patrick McCabe <cmccabe@nvidia.com>
Reviewed-on: http://git-master/r/60558
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

Rebase-Id: Rad06124e61bdf95cb0307dd2204f2bf4bb92e718

arch/arm/mach-tegra/tegra3_tsensor.c

index 866c6a9..c498a2d 100644 (file)
@@ -86,9 +86,11 @@ void __init tegra3_tsensor_init(struct tegra_tsensor_pmu_data *data)
                        __func__, __LINE__);
 
        pMem = ioremap(TEGRA_PMC_BASE + SCRATCH54_OFFSET, 8);
-       if (!pMem)
+       if (!pMem) {
                pr_err(" [%s, line=%d]: can't ioremap "
                        "pmc iomem\n", __FILE__, __LINE__);
+               goto labelEnd;
+       }
 
        /*
         * Fill scratch registers to power off the device