Re: clk: samsung: Checking a kmemdup() call in _samsung_clk_register_pll()

From: Tomasz Figa
Date: Wed Oct 16 2019 - 07:44:32 EST


2019å10æ16æ(æ) 19:55 Markus Elfring <Markus.Elfring@xxxxxx>:
>
> >> * Is there a need to adjust the error handling here?
> >
> > No, there isn't much that can be done if we fail the allocation at
> > such an early stage.
>
> Can it matter to perform the setting âpll->rate_countâ only according
> to a null pointer check for the variable âpll->rate_tableâ
> because of the function call âkmemdupâ?

It would be a good practice indeed, but looking from the code,
pll->rate_table is checked elsewhere, not pll->rate_count.

Best regards,
Tomasz