Skip to content

Commit 89d9c24

Browse files
Prashant Malanibleungatchromium
authored andcommitted
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 <[email protected]> Fixes: 9d33ea3 ("platform/chrome: cros_ec_typec: Register port partner") Signed-off-by: Benson Leung <[email protected]>
1 parent 9d33ea3 commit 89d9c24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/chrome/cros_ec_typec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static void cros_typec_set_port_params_v1(struct cros_typec_data *typec,
263263

264264
pd_en = resp->enabled & PD_CTRL_RESP_ENABLED_PD_CAPABLE;
265265
ret = cros_typec_add_partner(typec, port_num, pd_en);
266-
if (!ret)
266+
if (ret)
267267
dev_warn(typec->dev,
268268
"Failed to register partner on port: %d\n",
269269
port_num);

0 commit comments

Comments
 (0)