Skip to content

Commit a684d8f

Browse files
Colin Ian Kinggregkh
authored andcommitted
typec: tcpm: fix a typo in the comparison of pdo_max_voltage
There appears to be a typo in the comparison of pdo_max_voltage[i] with the previous value, currently it is checking against the array pdo_min_voltage rather than pdo_max_voltage. I believe this is a typo. Fix this. Addresses-Coverity: ("Copy-paste error") Fixes: 5007e1b ("typec: tcpm: Validate source and sink caps") Cc: stable <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 08d676d commit a684d8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/typec/tcpm/tcpm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ static enum pdo_err tcpm_caps_err(struct tcpm_port *port, const u32 *pdo,
14461446
else if ((pdo_min_voltage(pdo[i]) ==
14471447
pdo_min_voltage(pdo[i - 1])) &&
14481448
(pdo_max_voltage(pdo[i]) ==
1449-
pdo_min_voltage(pdo[i - 1])))
1449+
pdo_max_voltage(pdo[i - 1])))
14501450
return PDO_ERR_DUPE_PDO;
14511451
break;
14521452
/*

0 commit comments

Comments
 (0)