hwmon: tegra: tsensor: error handling change
Bitan Biswas [Thu, 28 Jul 2011 12:58:17 +0000 (17:58 +0530)]
tsensor setup function error path corrected to return error.

bug 857074

Original-Change-Id: I8c4be4868546d39c6c49de9eee4d20afe75f075a
Reviewed-on: http://git-master/r/43714
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

Rebase-Id: Rac3c6ffe339d05186ea38e07e03c517a5d5319ba

drivers/hwmon/tegra-tsensor.c

index bc72e86..0632383 100644 (file)
@@ -1471,6 +1471,7 @@ static int tegra_tsensor_setup(struct platform_device *pdev)
        if (!test_temperature_algo(data)) {
                dev_err(&pdev->dev, " Error: read temperature "
                        "algorithm broken ");
+               err = -EIO;
                goto err_setup;
        }