|
@@ -1609,27 +1609,27 @@ static int bq2415x_probe(struct i2c_client *client,
|
|
ret = of_property_read_u32(np, "ti,current-limit",
|
|
ret = of_property_read_u32(np, "ti,current-limit",
|
|
&bq->init_data.current_limit);
|
|
&bq->init_data.current_limit);
|
|
if (ret)
|
|
if (ret)
|
|
- return ret;
|
|
|
|
|
|
+ goto error_2;
|
|
ret = of_property_read_u32(np, "ti,weak-battery-voltage",
|
|
ret = of_property_read_u32(np, "ti,weak-battery-voltage",
|
|
&bq->init_data.weak_battery_voltage);
|
|
&bq->init_data.weak_battery_voltage);
|
|
if (ret)
|
|
if (ret)
|
|
- return ret;
|
|
|
|
|
|
+ goto error_2;
|
|
ret = of_property_read_u32(np, "ti,battery-regulation-voltage",
|
|
ret = of_property_read_u32(np, "ti,battery-regulation-voltage",
|
|
&bq->init_data.battery_regulation_voltage);
|
|
&bq->init_data.battery_regulation_voltage);
|
|
if (ret)
|
|
if (ret)
|
|
- return ret;
|
|
|
|
|
|
+ goto error_2;
|
|
ret = of_property_read_u32(np, "ti,charge-current",
|
|
ret = of_property_read_u32(np, "ti,charge-current",
|
|
&bq->init_data.charge_current);
|
|
&bq->init_data.charge_current);
|
|
if (ret)
|
|
if (ret)
|
|
- return ret;
|
|
|
|
|
|
+ goto error_2;
|
|
ret = of_property_read_u32(np, "ti,termination-current",
|
|
ret = of_property_read_u32(np, "ti,termination-current",
|
|
&bq->init_data.termination_current);
|
|
&bq->init_data.termination_current);
|
|
if (ret)
|
|
if (ret)
|
|
- return ret;
|
|
|
|
|
|
+ goto error_2;
|
|
ret = of_property_read_u32(np, "ti,resistor-sense",
|
|
ret = of_property_read_u32(np, "ti,resistor-sense",
|
|
&bq->init_data.resistor_sense);
|
|
&bq->init_data.resistor_sense);
|
|
if (ret)
|
|
if (ret)
|
|
- return ret;
|
|
|
|
|
|
+ goto error_2;
|
|
} else {
|
|
} else {
|
|
memcpy(&bq->init_data, pdata, sizeof(bq->init_data));
|
|
memcpy(&bq->init_data, pdata, sizeof(bq->init_data));
|
|
}
|
|
}
|