Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Lee Jones
b73d5593 30ed024f

+1 -1
+1 -1
drivers/mfd/syscon.c
··· 183 183 if (create_regmap) 184 184 syscon = of_syscon_register(np, check_res); 185 185 else 186 - syscon = ERR_PTR(-EINVAL); 186 + syscon = ERR_PTR(-EPROBE_DEFER); 187 187 } 188 188 mutex_unlock(&syscon_list_lock); 189 189