From: JC Kuo Date: Tue, 11 Aug 2020 09:31:43 +0000 (+0800) Subject: usb: host: xhci-tegra: otg usb2/usb3 port init X-Git-Tag: v5.8.6~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c08e590b07e4e2b7a86cb6b7b45e4ac8c9e804e6;p=thirdparty%2Fkernel%2Fstable.git usb: host: xhci-tegra: otg usb2/usb3 port init commit 316a2868bc269be8c6e69ccc3a1f902a3f518eb9 upstream. 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. Signed-off-by: JC Kuo Cc: stable Link: https://lore.kernel.org/r/20200811093143.699541-1-jckuo@nvidia.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index ee6bf01775bba..19059f6979bf7 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -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);