]> git.baikalelectronics.ru Git - uboot.git/commit
usb: dwc3: Fix remove function if there is no ulpi_reset gpio
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Wed, 9 Aug 2023 03:33:50 +0000 (09:03 +0530)
committerMarek Vasut <marex@denx.de>
Fri, 25 Aug 2023 00:35:40 +0000 (02:35 +0200)
commit0fab1a14ecfd9aa928d4ce772bf1e23c1382aee6
treec08335eac4267d697e04212a00cd9afe9e827864
parent3e9fbd899c824b822270fd0a1f94cd73987e8c38
usb: dwc3: Fix remove function if there is no ulpi_reset gpio

As ulpi_reset gpio is now optional, we need to check it when doing
the 'dwc3_generic_remove' function. Check if it is declared before
accessing the ulpi_reset.

Fixes: 506d66e987e ("usb: dwc3: Use the devm_gpiod_get_optional()
     API for reset gpio")

Reported-by: Thomas Nizan <tnizan@witekio.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
drivers/usb/dwc3/dwc3-generic.c