power: regulator: pfuze100: Fix accessing the regulator desc
authorPeng Fan <peng.fan@nxp.com>
Tue, 16 Sep 2025 02:57:35 +0000 (10:57 +0800)
committerFabio Estevam <festevam@gmail.com>
Sat, 20 Sep 2025 20:47:08 +0000 (17:47 -0300)
commit2727de799a644f4db15e8682503f783a62fa4af2
treedc6f062907b826b259e9d111ff2dbdbacd276351
parent8918b60e33157dd6abaaf11ea24437da133eed0a
power: regulator: pfuze100: Fix accessing the regulator desc

se_desc loop check is wrong, it relies on the desc always has
the expected name to end of the loop. It works because the device tree
has the expected name as of now, but this may not be always true.

Drop se_desc by moving the check into probe and fix the loop check.

Reported-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/power/regulator/pfuze100.c