Skip to content

Commit b470947

Browse files
robhancocksedgregkh
authored andcommitted
usb: dwc3: xilinx: fix uninitialized return value
A previous patch to skip part of the initialization when a USB3 PHY was not present could result in the return value being uninitialized in that case, causing spurious probe failures. Initialize ret to 0 to avoid this. Fixes: 9678f33 ("usb: dwc3: xilinx: Skip resets and USB3 register settings for USB2.0 mode") Cc: <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Robert Hancock <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 26291c5 commit b470947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/dwc3/dwc3-xilinx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static int dwc3_xlnx_init_zynqmp(struct dwc3_xlnx *priv_data)
9999
struct device *dev = priv_data->dev;
100100
struct reset_control *crst, *hibrst, *apbrst;
101101
struct phy *usb3_phy;
102-
int ret;
102+
int ret = 0;
103103
u32 reg;
104104

105105
usb3_phy = devm_phy_optional_get(dev, "usb3-phy");

0 commit comments

Comments
 (0)