diff --git a/drivers/usb/typec/hd3ss3220.c b/drivers/usb/typec/hd3ss3220.c index 9715600aeb04..8afaf5768a17 100644 --- a/drivers/usb/typec/hd3ss3220.c +++ b/drivers/usb/typec/hd3ss3220.c @@ -172,8 +172,8 @@ static int hd3ss3220_probe(struct i2c_client *client, hd3ss3220_set_source_pref(hd3ss3220, HD3SS3220_REG_GEN_CTRL_SRC_PREF_DRP_DEFAULT); connector = device_get_named_child_node(hd3ss3220->dev, "connector"); - if (IS_ERR(connector)) - return PTR_ERR(connector); + if (!connector) + return -ENODEV; hd3ss3220->role_sw = fwnode_usb_role_switch_get(connector); fwnode_handle_put(connector);