diff options
Diffstat (limited to 'drivers/misc/lis3lv02d')
-rw-r--r-- | drivers/misc/lis3lv02d/lis3lv02d_i2c.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c index b20dfb4522d..ea9159c65b5 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c +++ b/drivers/misc/lis3lv02d/lis3lv02d_i2c.c | |||
@@ -161,8 +161,13 @@ static int __devinit lis3lv02d_i2c_probe(struct i2c_client *client, | |||
161 | if (lis3_dev.reg_ctrl) | 161 | if (lis3_dev.reg_ctrl) |
162 | lis3_reg_ctrl(&lis3_dev, LIS3_REG_OFF); | 162 | lis3_reg_ctrl(&lis3_dev, LIS3_REG_OFF); |
163 | 163 | ||
164 | if (ret == 0) | 164 | if (ret) |
165 | return 0; | 165 | goto fail2; |
166 | return 0; | ||
167 | |||
168 | fail2: | ||
169 | regulator_bulk_free(ARRAY_SIZE(lis3_dev.regulators), | ||
170 | lis3_dev.regulators); | ||
166 | fail: | 171 | fail: |
167 | if (pdata && pdata->release_resources) | 172 | if (pdata && pdata->release_resources) |
168 | pdata->release_resources(); | 173 | pdata->release_resources(); |