Re: [PATCH v3] clk: qcom: Fix error checking for devm_clk_hw_get_clk()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Dmitry Baryshkov (2024-08-29 02:06:51)
> On Tue, Aug 27, 2024 at 11:18:10AM GMT, Stephen Boyd wrote:
> > Quoting Yan Zhen (2024-08-26 19:52:52)
> > > The devm_clk_hw_get_clk() function returns error pointers.
> > > It never returns NULL.  Update the check accordingly.
> > 
> > It can return NULL if the 'hw' pointer passed in is NULL.
> 
> No, it will crash:
> 
>         WARN_ON_ONCE(dev != hw->core->dev);
> 
> Furthermore, clk_hw_get_clk() also doesn't have NULL checks and will
> crash if NULL is passed as hw.

Ah, thanks. I misread it as clk_hw_create_clk().





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux