]> git.baikalelectronics.ru Git - kernel.git/commit
typec: tcpm: fix a typo in the comparison of pdo_max_voltage
authorColin Ian King <colin.king@canonical.com>
Thu, 22 Aug 2019 13:52:12 +0000 (14:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Aug 2019 20:48:37 +0000 (22:48 +0200)
commit980d2a10def258260541b8998177cb18c36c5e9e
treea3a7f8437ce6faaac732eed14f726c239c7cea9c
parent6b1cea5380eb57ca245301c84b7eb44ec08e0617
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: eff95d17ab09 ("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>
drivers/usb/typec/tcpm/tcpm.c