|
@@ -161,8 +161,13 @@ static int __devinit lis3lv02d_i2c_probe(struct i2c_client *client,
|
|
if (lis3_dev.reg_ctrl)
|
|
if (lis3_dev.reg_ctrl)
|
|
lis3_reg_ctrl(&lis3_dev, LIS3_REG_OFF);
|
|
lis3_reg_ctrl(&lis3_dev, LIS3_REG_OFF);
|
|
|
|
|
|
- if (ret == 0)
|
|
|
|
- return 0;
|
|
|
|
|
|
+ if (ret)
|
|
|
|
+ goto fail2;
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
|
|
+fail2:
|
|
|
|
+ regulator_bulk_free(ARRAY_SIZE(lis3_dev.regulators),
|
|
|
|
+ lis3_dev.regulators);
|
|
fail:
|
|
fail:
|
|
if (pdata && pdata->release_resources)
|
|
if (pdata && pdata->release_resources)
|
|
pdata->release_resources();
|
|
pdata->release_resources();
|