[PATCH] usb: dwc3: Fix the return value of gpio_request_by_name()
Marek Vasut
marex at denx.de
Fri Jan 6 05:21:24 CET 2023
On 1/6/23 04:51, Venkatesh Yadav Abbarapu wrote:
> As the "reset-gpios" property is optional, don't return the
> error and just skip the gpio reset sequence.
>
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu at amd.com>
> ---
>
> drivers/usb/dwc3/dwc3-generic.c | 24 ++++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
> index 78966718d0..e88e0b2e5a 100644
> --- a/drivers/usb/dwc3/dwc3-generic.c
> +++ b/drivers/usb/dwc3/dwc3-generic.c
> @@ -93,21 +93,21 @@ static int dwc3_generic_probe(struct udevice *dev,
> device_is_compatible(dev->parent, "xlnx,zynqmp-dwc3")) {
> rc = gpio_request_by_name(dev->parent, "reset-gpios", 0,
Have a look at devm_gpiod_get_optional() , this might simplify the code.
More information about the U-Boot
mailing list