mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
typec: tcpm: fix a typo in the comparison of pdo_max_voltage
commita684d8fd87upstream. 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:5007e1b5db("typec: tcpm: Validate source and sink caps") Cc: stable <stable@vger.kernel.org> Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20190822135212.10195-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e91c9c119d
commit
e44840b732
@@ -1445,7 +1445,7 @@ static enum pdo_err tcpm_caps_err(struct tcpm_port *port, const u32 *pdo,
|
||||
else if ((pdo_min_voltage(pdo[i]) ==
|
||||
pdo_min_voltage(pdo[i - 1])) &&
|
||||
(pdo_max_voltage(pdo[i]) ==
|
||||
pdo_min_voltage(pdo[i - 1])))
|
||||
pdo_max_voltage(pdo[i - 1])))
|
||||
return PDO_ERR_DUPE_PDO;
|
||||
break;
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user