hwmon: tegra: tsensor: error propagation
Bitan Biswas [Fri, 12 Aug 2011 08:49:19 +0000 (13:49 +0530)]
tsensor probe was not propagating error from a called function.
Later suspend/resume was getting called causing crash. Fixed the code.

bug 863316

Original-Change-Id: I1851d75aeeee332bc582fe45fd7c1c8f0521b5c7
Reviewed-on: http://git-master/r/46890
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

Rebase-Id: R77a15193c8ae51746ff477f3d877825dd81ecd34

drivers/hwmon/tegra-tsensor.c

index 257294d..c7ac0f9 100644 (file)
@@ -1601,7 +1601,8 @@ static int __devinit tegra_tsensor_probe(struct platform_device *pdev)
        pr_info("tsensor active instance=%d\n", tsensor_index);
 
        /* tegra tsensor - setup and init */
-       if (tegra_tsensor_setup(pdev) != 0)
+       err = tegra_tsensor_setup(pdev);
+       if (err)
                goto err6;
 
        dev_dbg(&pdev->dev, "end tegra_tsensor_probe\n");