diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index f07be3647985f5ac6e790ea844e9d4c58b6a9fec..52d1b6cad76f55ac8e2a6a8d4301d5820ae7cf1f 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c @@ -230,7 +230,7 @@ static int act8865_pdata_from_dt(struct device *dev, if (!pdata->regulators) return -ENOMEM; - pdata->num_regulators = matched; + pdata->num_regulators = ARRAY_SIZE(act8865_matches); regulator = pdata->regulators; for (i = 0; i < ARRAY_SIZE(act8865_matches); i++) {