Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8c7e7ddf authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

regulator: max77693: Remove NULL test for rmatch[i].init_data



The implementation in of_regulator_match() already ensures match->init_data is
not NULL for all matched cases if the return value of of_regulator_match() > 0.

Thus remove NULL test for rmatch[i].init_data.

This patch also fixes the condition for loop iteration.
The for loop should iterate "matched" times rather than ARRAY_SIZE(regulators)
because we only allocate "matched" number of entries for rdata.
Though in most cases, "matched" == ARRAY_SIZE(regulators).

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarJonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent f3ecdd7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment