diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c index d45a4dd171315e6d1da23495b79cf5731fed6a61..ce4b96c15ebaaf37cb26daa2d4a51df68d1e31e3 100644 --- a/drivers/regulator/max77693.c +++ b/drivers/regulator/max77693.c @@ -190,9 +190,7 @@ static int max77693_pmic_dt_parse_rdata(struct device *dev, tmp = *rdata; - for (i = 0; i < ARRAY_SIZE(regulators); i++) { - if (!rmatch[i].init_data) - continue; + for (i = 0; i < matched; i++) { tmp->initdata = rmatch[i].init_data; tmp->of_node = rmatch[i].of_node; tmp->id = regulators[i].id;