|
@@ -965,7 +965,13 @@ static int 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);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* Setup a notifier block to update this if another device
|
|
|
* causes the voltage to change
|