phy: tegra: xusb: Add error pointer check in xusb.c

Add error pointer check after tegra_xusb_find_lane().

Fixes: e8f7d2f409 ("phy: tegra: xusb: Add usb-phy support")
Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20240930191101.13184-1-kdipendra88@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
Dipendra Khadka 2024-09-30 19:11:00 +00:00 committed by Vinod Koul
parent 16fde3e076
commit e70d2677ef

View File

@ -699,6 +699,8 @@ static int tegra_xusb_setup_usb_role_switch(struct tegra_xusb_port *port)
return -ENOMEM;
lane = tegra_xusb_find_lane(port->padctl, "usb2", port->index);
if (IS_ERR(lane))
return PTR_ERR(lane);
/*
* Assign phy dev to usb-phy dev. Host/device drivers can use phy