Merge tag 'usb-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[platform/kernel/linux-starfive.git] / drivers / usb / typec / ucsi / ucsi.c
index 6364f0d..74fb5a4 100644 (file)
@@ -1067,11 +1067,9 @@ static int ucsi_register_port(struct ucsi *ucsi, int index)
 
        cap->fwnode = ucsi_find_fwnode(con);
        con->usb_role_sw = fwnode_usb_role_switch_get(cap->fwnode);
-       if (IS_ERR(con->usb_role_sw)) {
-               dev_err(ucsi->dev, "con%d: failed to get usb role switch\n",
-                       con->num);
-               return PTR_ERR(con->usb_role_sw);
-       }
+       if (IS_ERR(con->usb_role_sw))
+               return dev_err_probe(ucsi->dev, PTR_ERR(con->usb_role_sw),
+                       "con%d: failed to get usb role switch\n", con->num);
 
        /* Delay other interactions with the con until registration is complete */
        mutex_lock(&con->lock);