From: Steffen Dirkwinkel <lists@steffen.cc>
To: u-boot@lists.denx.de
Cc: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Jonas Karlman <jonas@kwiboo.se>,
Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
Marek Vasut <marex@denx.de>,
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Subject: [PATCH 2/5] drivers/usb/dwc3: zynqmp: only free reset gpio if we have one
Date: Wed, 30 Aug 2023 16:03:31 +0200 [thread overview]
Message-ID: <20230830140349.10801-3-lists@steffen.cc> (raw)
In-Reply-To: <20230830140349.10801-1-lists@steffen.cc>
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
This gpio is optional so undonditionally freeing it will crash.
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
drivers/usb/dwc3/dwc3-generic.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 7f0af05855..dcc342ed04 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -149,7 +149,9 @@ static int dwc3_generic_remove(struct udevice *dev,
priv->ulpi_reset) {
struct gpio_desc *ulpi_reset = priv->ulpi_reset;
- dm_gpio_free(ulpi_reset->dev, ulpi_reset);
+ if (priv->ulpi_reset) {
+ dm_gpio_free(ulpi_reset->dev, ulpi_reset);
+ }
}
dwc3_remove(dwc3);
--
2.42.0
next prev parent reply other threads:[~2023-08-30 18:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 14:03 [PATCH 0/5] board: xilinx: zyqmp: add Beckhoff CX8200 Steffen Dirkwinkel
2023-08-30 14:03 ` [PATCH 1/5] drivers: rtc: add rv3032 driver Steffen Dirkwinkel
2023-08-30 19:43 ` Alexandre Belloni
2023-08-30 19:52 ` Steffen Dirkwinkel
2023-08-30 14:03 ` Steffen Dirkwinkel [this message]
2023-09-01 7:18 ` [PATCH 2/5] drivers/usb/dwc3: zynqmp: only free reset gpio if we have one Michal Simek
2023-08-30 14:03 ` [PATCH 3/5] xilinx: zynqmp: move fdt_addr so we can use devices with less memory Steffen Dirkwinkel
2023-09-01 7:23 ` Michal Simek
2023-08-30 14:03 ` [PATCH 4/5] xilinx: zynqmp: add Beckhoff CX8200 Steffen Dirkwinkel
2023-09-01 7:36 ` Michal Simek
2023-09-01 9:00 ` Steffen Dirkwinkel
2023-09-01 11:16 ` Michal Simek
2023-09-01 15:03 ` Steffen Dirkwinkel
2023-09-04 10:02 ` Michal Simek
2023-08-30 14:03 ` [PATCH 5/5] xilinx: zynqmp: beckhoff cx8200: setup inner cache broadcasting Steffen Dirkwinkel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230830140349.10801-3-lists@steffen.cc \
--to=lists@steffen.cc \
--cc=hayashi.kunihiko@socionext.com \
--cc=jagan@amarulasolutions.com \
--cc=jonas@kwiboo.se \
--cc=marex@denx.de \
--cc=s.dirkwinkel@beckhoff.com \
--cc=u-boot@lists.denx.de \
--cc=venkatesh.abbarapu@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.