summaryrefslogtreecommitdiff
path: root/drivers/hwmon/lis3lv02d_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/lis3lv02d_i2c.c')
-rw-r--r--drivers/hwmon/lis3lv02d_i2c.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hwmon/lis3lv02d_i2c.c b/drivers/hwmon/lis3lv02d_i2c.c
index 0074809917a2..9f4bae07f719 100644
--- a/drivers/hwmon/lis3lv02d_i2c.c
+++ b/drivers/hwmon/lis3lv02d_i2c.c
@@ -160,7 +160,12 @@ static int __devinit lis3lv02d_i2c_probe(struct i2c_client *client,
if (lis3_dev.reg_ctrl)
lis3_reg_ctrl(&lis3_dev, LIS3_REG_OFF);
+
+ if (ret == 0)
+ return 0;
fail:
+ if (pdata && pdata->release_resources)
+ pdata->release_resources();
return ret;
}