Skip to content

Commit

Permalink
phy: tegra: xusb: Add error pointer check in xusb.c
Browse files Browse the repository at this point in the history
Add error pointer check after tegra_xusb_find_lane().

Fixes: e8f7d2f ("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>
  • Loading branch information
Dipendra Khadka authored and Vinod Koul committed Oct 21, 2024
1 parent 16fde3e commit e70d267
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/phy/tegra/xusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e70d267

Please sign in to comment.