diff options
author | Prashant Malani <pmalani@chromium.org> | 2020-04-22 02:41:51 +0200 |
---|---|---|
committer | Benson Leung <bleung@chromium.org> | 2020-04-22 02:51:04 +0200 |
commit | 89d9c24b391646308b6c1d3a68c8c521c9b8c8e9 (patch) | |
tree | bc983a22c16ed9da9f9deb23bc77b304aaf156a3 /drivers/platform/chrome | |
parent | platform/chrome: cros_ec_typec: Register port partner (diff) | |
download | linux-89d9c24b391646308b6c1d3a68c8c521c9b8c8e9.tar.xz linux-89d9c24b391646308b6c1d3a68c8c521c9b8c8e9.zip |
platform/chrome: typec: Fix ret value check error
cros_typec_add_partner() returns 0 on success, so check for "ret"
instead of "!ret" as an error.
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Fixes: 9d33ea331032 ("platform/chrome: cros_ec_typec: Register port partner")
Signed-off-by: Benson Leung <bleung@chromium.org>
Diffstat (limited to 'drivers/platform/chrome')
-rw-r--r-- | drivers/platform/chrome/cros_ec_typec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index eda57db26f8d..66b8d21092af 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -263,7 +263,7 @@ static void cros_typec_set_port_params_v1(struct cros_typec_data *typec, pd_en = resp->enabled & PD_CTRL_RESP_ENABLED_PD_CAPABLE; ret = cros_typec_add_partner(typec, port_num, pd_en); - if (!ret) + if (ret) dev_warn(typec->dev, "Failed to register partner on port: %d\n", port_num); |