aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_main.c
diff options
context:
space:
mode:
authorWei Fang <wei.fang@nxp.com>2024-09-11 20:03:38 +0800
committerMark Brown <broonie@kernel.org>2024-09-11 15:39:01 +0100
commita1d12410d9b1ecff87d39f80b0d1cec895012ffa (patch)
tree4dda8fe71da8d53abff710d74ef5fb9c5aab70f6 /drivers/net/ethernet/intel/ice/ice_main.c
parent5faf6daf659a83bd036190172eb17b1f9b3a0b01 (diff)
regulator: core: fix the broken behavior of regulator_dev_lookup()
The behavior of regulator_dev_lookup() for non-DT way has been broken since the commit b8c325545714 ("regulator: Move OF-specific regulator lookup code to of_regulator.c"). Before the commit, of_get_regulator() was used to get the regulator, which returns NULL if the regulator is not found. So the regulator will be looked up through regulator_lookup_by_name() if no matching regulator is found in regulator_map_list. However, currently, of_regulator_dev_lookup() is used to instead of of_get_regulator(), but the variable 'r' is set to ERR_PTR(-ENODEV) instead of NULL if the regulator is not found. In this case, if no regulator is found in regulator_map_list, the variable 'r' is still ERR_PTR(-ENODEV), So regulator_dev_lookup() returns the value of 'r' directly instead of continuing to look up the regulator through regulator_lookup_by_name(). Fixes: b8c325545714 ("regulator: Move OF-specific regulator lookup code to of_regulator.c") Signed-off-by: Wei Fang <wei.fang@nxp.com> Link: https://patch.msgid.link/20240911120338.526384-1-wei.fang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
0 files changed, 0 insertions, 0 deletions