[PATCH v4 1/7] usb: dwc3: Add dwc3 glue driver for am62

Mattijs Korpershoek mkorpershoek at baylibre.com
Thu May 2 09:03:52 CEST 2024


Hi Martyn,

On mer., mai 01, 2024 at 14:56, Martyn Welch <martyn.welch at collabora.com> wrote:

> On Tue, 2024-01-16 at 11:22 +0100, Mattijs Korpershoek wrote:
>> > +	/* Program PHY PLL refclk by reading syscon property */
>> > +	ret = regmap_update_bits(syscon, args.args[0],
>> > PHY_PLL_REFCLK_MASK, rate_code);
>> > +	if (ret) {
>> 
>> The doc of ofnode_parse_phandle_with_args() states that:
>> 
>>  * Caller is responsible to call of_node_put() on the returned
>> out_args->np
>>  * pointer.
>> 
>> Should we call of_node_put(args->np); before returning here?
>> 
>
> It doesn't seem that this is done in U-Boot as the definition of
> of_node_put() here is:
>
>    /* Dummy functions to mirror Linux. These are not used in U-Boot */
>    #define of_node_get(x) (x)
>    static inline void of_node_put(const struct device_node *np) { }

Indeed, thank you for looking into this.

In that case,

Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>

>
> Martyn
>
>> Should the cleanup be done in case of success as well?
>> 
>> With that fixed:
>> 
>> Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>
>> 


More information about the U-Boot mailing list