[PATCH 2/5] usb: dwc3-generic: Return early when there is no child node
Marek Vasut
marex at denx.de
Thu Jul 13 12:08:57 CEST 2023
On 7/13/23 11:51, Jonas Karlman wrote:
> Hi Marek,
>
> Sorry for a late reply.
>
> On 2023-06-05 12:12, Marek Vasut wrote:
>> On 5/30/23 12:26, Jonas Karlman wrote:
>>> The call to device_find_first_child always return 0, change to return
>>> early when there is no child node.
>>>
>>> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
>>> ---
>>> drivers/usb/dwc3/dwc3-generic.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
>>> index 66da5a8d6f8c..c28ad47bddd8 100644
>>> --- a/drivers/usb/dwc3/dwc3-generic.c
>>> +++ b/drivers/usb/dwc3/dwc3-generic.c
>>> @@ -558,9 +558,9 @@ int dwc3_glue_probe(struct udevice *dev)
>>> return ret;
>>> }
>>>
>>> - ret = device_find_first_child(dev, &child);
>>> - if (ret)
>>> - return ret;
>>> + device_find_first_child(dev, &child);
>>> + if (!child)
>>> + return 0;
>>>
>>> if (glue->clks.count == 0) {
>>> ret = dwc3_glue_clk_init(child, glue);
>>
>> If this is a fix, then please send this separately, so I can pick it for
>> current release.
>
> Current boards using this driver is not affected by this. To my knowledge
> only RK3328 may have been affected by this, DT does not have any resets.
>
> Adding support for RK3328 in this driver is part of the series "rockchip:
> Fix RK3328 USB support" by Jagan, a series that depend on patches in this
> series.
>
> Should I still re-send this patch as a separate patch?
Release is already out, so, no need.
More information about the U-Boot
mailing list