[PATCH RFC] clk: versaclock7: propagate all xin lookup failures
From: Slavin Liu
Date: Fri Sep 11 2026 - 02:11:05 EST
The xin clock is used to obtain the APLL reference rate. Handle all
lookup errors, not only probe deferral, before clk_get_rate() can see
an error pointer.
Detected by static analysis and reviewed with AI-assisted source auditing.
Fixes: 48c5e98fedd9 ("clk: Renesas versaclock7 ccf device driver")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@xxxxxxxxxx>
---
drivers/clk/clk-versaclock7.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk-versaclock7.c b/drivers/clk/clk-versaclock7.c
index 1340d2f512be..5f32d3fb807a 100644
--- a/drivers/clk/clk-versaclock7.c
+++ b/drivers/clk/clk-versaclock7.c
@@ -1117,8 +1117,8 @@ static int vc7_probe(struct i2c_client *client)
vc7->chip_info = i2c_get_match_data(client);
vc7->pin_xin = devm_clk_get(&client->dev, "xin");
- if (PTR_ERR(vc7->pin_xin) == -EPROBE_DEFER) {
- return dev_err_probe(&client->dev, -EPROBE_DEFER,
+ if (IS_ERR(vc7->pin_xin)) {
+ return dev_err_probe(&client->dev, PTR_ERR(vc7->pin_xin),
"xin not specified\n");
}