Skip to contentSkip to conversation

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

PATCH Applied Dipendra Khadka 3 participants 3 messages Sep 30, 2024 – Oct 22, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: tegra: xusb: Add error pointer check in xusb.c

Add error pointer check after tegra_xusb_find_lane().

Fixes e8f7d2f409a1 ("phy: tegra: xusb: Add usb-phy support")
---
 drivers/phy/tegra/xusb.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/phy/tegra/xusb.c +2 -0
index cfdb54b6070a..342f5ccf611d 100644
@@ -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
Signature · 1 line
2.43.0
maintainer Applied
#2 lore raw
In reply to Dipendra Khadka
Quoted 3 lines · Dipendra Khadka

Add error pointer check after tegra_xusb_find_lane().

Applied, thanks!

[1/1] phy: tegra: xusb: Add error pointer check in xusb.c

      commit: e70d2677ef4088d59158739d72b67ac36d1b132b

Best regards,

Signature · 1 line
~Vinod