summaryrefslogtreecommitdiff
path: root/rust/helpers/bitops.c
diff options
context:
space:
mode:
authorWenhua Lin <Wenhua.Lin@unisoc.com>2025-10-22 11:08:40 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-26 13:12:19 +0100
commit29e8a0c587e328ed458380a45d6028adf64d7487 (patch)
treee2f559fafdb1722045871d071c3474787fbce376 /rust/helpers/bitops.c
parentf0a6e936eb9ca1cfb1c58239ef22e50e761a7a06 (diff)
serial: sprd: Return -EPROBE_DEFER when uart clock is not ready
In sprd_clk_init(), when devm_clk_get() returns -EPROBE_DEFER for either uart or source clock, we should propagate the error instead of just warning and continuing with NULL clocks. Currently the driver only emits a warning when clock acquisition fails and proceeds with NULL clock pointers. This can lead to issues later when the clocks are actually needed. More importantly, when the clock provider is not ready yet and returns -EPROBE_DEFER, we should return this error to allow deferred probing. This change adds explicit checks for -EPROBE_DEFER after both: 1. devm_clk_get(uport->dev, uart) 2. devm_clk_get(uport->dev, source) When -EPROBE_DEFER is encountered, the function now returns -EPROBE_DEFER to let the driver framework retry probing later when the clock dependencies are resolved. Signed-off-by: Wenhua Lin <Wenhua.Lin@unisoc.com> Link: https://patch.msgid.link/20251022030840.956589-1-Wenhua.Lin@unisoc.com Reviewed-by: Cixi Geng <cixi.geng@linux.dev> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/helpers/bitops.c')
0 files changed, 0 insertions, 0 deletions