Skip to content

Commit e70d267

Browse files
Dipendra333vinodkoul
authored andcommitted
phy: tegra: xusb: Add error pointer check in xusb.c
Add error pointer check after tegra_xusb_find_lane(). Fixes: e8f7d2f ("phy: tegra: xusb: Add usb-phy support") Signed-off-by: Dipendra Khadka <[email protected]> Acked-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 16fde3e commit e70d267

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/phy/tegra/xusb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,8 @@ static int tegra_xusb_setup_usb_role_switch(struct tegra_xusb_port *port)
699699
return -ENOMEM;
700700

701701
lane = tegra_xusb_find_lane(port->padctl, "usb2", port->index);
702+
if (IS_ERR(lane))
703+
return PTR_ERR(lane);
702704

703705
/*
704706
* Assign phy dev to usb-phy dev. Host/device drivers can use phy

0 commit comments

Comments
 (0)