Skip to contentSkip to conversation

usb: host: xhci-tegra: otg usb2/usb3 port init

PATCH New JC Kuo 1 participant 1 message Aug 11, 2020

Subsystems (3)
lore
Share & tools
lore

JC Kuo

author
#0 lore raw

PATCH 1/1 usb: host: xhci-tegra: otg usb2/usb3 port init

tegra_xusb_init_usb_phy() should initialize "otg_usb2_port" and "otg_usb3_port" with -EINVAL because "0" is a valid value represents usb2 port 0 or usb3 port 0.

---
 drivers/usb/host/xhci-tegra.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-tegra.c +2 -0
index 014d79334f50..0489a316099a 100644
@@ -1258,6 +1258,8 @@ static int tegra_xusb_init_usb_phy(struct tegra_xusb *tegra)
 
 	INIT_WORK(&tegra->id_work, tegra_xhci_id_work);
 	tegra->id_nb.notifier_call = tegra_xhci_id_notify;
+	tegra->otg_usb2_port = -EINVAL;
+	tegra->otg_usb3_port = -EINVAL;
 
 	for (i = 0; i < tegra->num_usb_phys; i++) {
 		struct phy *phy = tegra_xusb_get_phy(tegra, "usb2", i);
Signature · 1 line
2.25.1