aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/sht15.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-03-07 12:46:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-07 12:46:25 -0800
commitcd66acb412d3466bb95d3d7621afbea98647a028 (patch)
treecaf08b5492d530f2d6ace590eb0d6ee598f3b986 /drivers/hwmon/sht15.c
parentMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc (diff)
parenthwmon: (sht15) Check return value of regulator_enable() (diff)
downloadlinux-dev-cd66acb412d3466bb95d3d7621afbea98647a028.tar.xz
linux-dev-cd66acb412d3466bb95d3d7621afbea98647a028.zip
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon patches from Guenter Roeck: "Bug fixes for sht15 and ltc2978 driver plus some documentation updates" * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (sht15) Check return value of regulator_enable() hwmon: (adt7410) Document ADT7420 support hwmon: (pmbus/ltc2978) Use detected chip ID to select supported functionality hwmon: (pmbus/ltc2978) Fix peak attribute handling hwmon: (pmbus/ltc2978) Update datasheet links hwmon: Update my e-mail address in driver documentation
Diffstat (limited to 'drivers/hwmon/sht15.c')
-rw-r--r--drivers/hwmon/sht15.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index bfe326e896df..2507f902fb7a 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -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