Commit 89d9c24b authored by Prashant Malani's avatar Prashant Malani Committed by Benson Leung

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: default avatarPrashant Malani <pmalani@chromium.org>
Fixes: 9d33ea33 ("platform/chrome: cros_ec_typec: Register port partner")
Signed-off-by: default avatarBenson Leung <bleung@chromium.org>
parent 9d33ea33
...@@ -263,7 +263,7 @@ static void cros_typec_set_port_params_v1(struct cros_typec_data *typec, ...@@ -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; pd_en = resp->enabled & PD_CTRL_RESP_ENABLED_PD_CAPABLE;
ret = cros_typec_add_partner(typec, port_num, pd_en); ret = cros_typec_add_partner(typec, port_num, pd_en);
if (!ret) if (ret)
dev_warn(typec->dev, dev_warn(typec->dev,
"Failed to register partner on port: %d\n", "Failed to register partner on port: %d\n",
port_num); port_num);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment