Re: [PATCH] cpufreq: Fix an IS_ERR() vs NULL bug in spear1340_set_cpu_rate()

Dan Carpenter <[email protected]> Mon, 13 Jul 2026 10:56:32 +0300
Newsgroups gmane.linux.kernel,gmane.linux.power-management.general,gmane.linux.kernel.janitors
Message-ID <[email protected]>
On Mon, Jul 13, 2026 at 09:31:12AM +0530, Viresh Kumar wrote:
> On 12-07-26, 21:30, Zhongqiu Han wrote:
> > On 7/11/2026 3:34 AM, Dan Carpenter wrote:
> > > The clk_get_parent() function doesn't return error pointers, it returns
> > > NULL on error.  Update the error checking to match.
> 
> origin/master:include/linux/clk.h
> 
> /**
>  * clk_get_parent - get the parent clock source for this clock
>  * @clk: clock source
>  *
>  * Returns struct clk corresponding to parent clock source, or
>  * valid IS_ERR() condition containing errno.
>  */
> struct clk *clk_get_parent(struct clk *clk);
> 
> I think this is the source of the confusion.
> 

I'll send a separate patch to update that documentation.

regards,
dan carpenter