Message ID | 20250622140455.2884518-1-alok.a.tiwari@oracle.com |
---|---|
State | New |
Headers | show |
Series | [QUERY] thunderbolt: Should usb4_port_device_add() return ERR_PTR() on component_add() failure? | expand |
diff --git a/drivers/thunderbolt/usb4_port.c b/drivers/thunderbolt/usb4_port.c index 852a45fcd19d1..6db4a0c8e4496 100644 --- a/drivers/thunderbolt/usb4_port.c +++ b/drivers/thunderbolt/usb4_port.c @@ -323,6 +323,7 @@ struct usb4_port *usb4_port_device_add(struct tb_port *port) if (ret) { dev_err(&usb4->dev, "failed to add component\n"); device_unregister(&usb4->dev); + return ERR_PTR(ret); } if (!tb_is_upstream_port(port))