diff options
-rw-r--r-- | drivers/usb/typec/tipd/core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index e16c6c07c72a..f546f4ae563a 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -1549,11 +1549,8 @@ static int tps6598x_probe(struct i2c_client *client) goto err_role_put; if (status & TPS_STATUS_PLUG_PRESENT) { - ret = tps6598x_read16(tps, TPS_REG_POWER_STATUS, &tps->pwr_status); - if (ret < 0) { - dev_err(tps->dev, "failed to read power status: %d\n", ret); + if (!tps6598x_read_power_status(tps)) goto err_unregister_port; - } ret = tps6598x_connect(tps, status); if (ret) dev_err(&client->dev, "failed to register partner\n"); |