diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index d6088ba447af..8c0ca3c128ee 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -352,8 +352,8 @@ static int cros_typec_init_ports(struct cros_typec_data *typec) cros_port->port = typec_register_port(dev, cap); if (IS_ERR(cros_port->port)) { - dev_err(dev, "Failed to register port %d\n", port_num); ret = PTR_ERR(cros_port->port); + dev_err_probe(dev, ret, "Failed to register port %d\n", port_num); goto unregister_ports; }