Re: [PATCH RFC] clk: versaclock7: propagate all xin lookup failures
From: Brian Masney
Date: Fri Sep 18 2026 - 18:24:36 EST
Hi Slavin,
On Fri, Sep 11, 2026 at 02:09:18PM +0800, Slavin Liu wrote:
> 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");
Could you clarify the error message as well? Perhaps 'devm_clk_get failed for
xin' ?
You can drop the PATCH RFC on the next version.
Brian