Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / drivers / hwmon / sht15.c
index 5357925..3e3153e 100644 (file)
@@ -926,7 +926,13 @@ static int __devinit sht15_probe(struct platform_device *pdev)
                if (voltage)
                        data->supply_uV = voltage;
 
-               regulator_enable(data->reg);
+               ret = regulator_enable(data->reg);
+               if (ret != 0) {
+                       dev_err(&pdev->dev,
+                               "failed to enable regulator: %d\n", ret);
+                       goto err_free_data;
+               }
+
                /*
                 * Setup a notifier block to update this if another device
                 * causes the voltage to change