mfd: syscon: Return -EPROBE_DEFER if the syscon is not found

These days we can register syscons with of_syscon_register_regmap() so
when we can't find the syscon that probably means it hasn't been
registered yet.  Return -EPROBE_DEFER so the driver will try probing
again.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/aQdHmrchkmOr34r3@stanley.mountain
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Dan Carpenter 2025-11-02 14:59:22 +03:00 committed by Lee Jones
parent 30ed024fb0
commit b73d5593bf
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ static struct regmap *device_node_get_regmap(struct device_node *np,
if (create_regmap) if (create_regmap)
syscon = of_syscon_register(np, check_res); syscon = of_syscon_register(np, check_res);
else else
syscon = ERR_PTR(-EINVAL); syscon = ERR_PTR(-EPROBE_DEFER);
} }
mutex_unlock(&syscon_list_lock); mutex_unlock(&syscon_list_lock);