]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: rt5190a: check if init_data is NULL, bypass rt5190a_of_parse_cb
authorChiYuan Huang <cy_huang@richtek.com>
Thu, 2 Jun 2022 05:44:06 +0000 (13:44 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jun 2022 11:39:10 +0000 (12:39 +0100)
commit749bce359f1e5d3dad3a6f6a189872ffca5345d3
treea7daed489bef674d5fd92140320961ff8f74b5a7
parent1eb5da10daa85ff1cb3bda0c63c72bf14ad6e048
regulator: rt5190a: check if init_data is NULL, bypass rt5190a_of_parse_cb

If the node for the match name cannot be found, 'of_regulator_match' will
returns init_data as NULL for this regulator.

Add the check for the init_data. If it's NULL, make 'rt5190a_of_parse_cb'
function directly return.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://lore.kernel.org/r/1654148646-12182-1-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/rt5190a-regulator.c