[PATCH 1/2] clk: fix clk_get error handling

Sam Ravnborg sam at ravnborg.org
Mon Jul 3 23:53:38 PDT 2017


Hi Uwe.

Thanks for the quick feedback!

> Looking into the tree of functions that can be called from
> of_clk_get_by_name I didn't find a function that returns ENODEV.
> 
> But consider a clock provider that tries to give you the clock and
> triggers a EIO or ETIMEOUT. IMHO this should be given to the caller
> instead of continuing with clk_get_sys. So I suggest
> 
> -		if (!IS_ERR(clk) || PTR_ERR(clk) != -ENODEV)
> +		if (!IS_ERR(clk) || PTR_ERR(clk) != -ENOENT)
> 
> instead of your patch.

Makes good sense and it was only because the kernel did otherwise
I explicitly tested for -EPROBE_DEFER.
Will rework and send an updated patch later today.

	Sam



More information about the barebox mailing list