diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2024-08-30 14:16:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-03 10:06:15 +0200 |
commit | de3d7969f6a80aa5abbbc0f39897495ae35548d0 (patch) | |
tree | 5d3ba990f43c721af72012c1adce284da228a290 /lib/crypto/mpi/mpi-cmp.c | |
parent | e2940928115e83d707b21bf00b0db7d6c15f8341 (diff) |
usb: typec: ucsi: Fix the partner PD revision
The Partner PD Revision field in GET_CONNECTOR_CAPABILITY
data structure was introduced in UCSI v2.1. In
ucsi_check_connector_capability() the version was assumed to
be 2.0, and in ucsi_register_partner() the field is accessed
completely unconditionally.
Fixing the version in ucsi_check_connector_capability(), and
replacing the unconditional pd_revision assignment with a
direct call to ucsi_check_connector_capability() in
ucsi_register_port(). After this the revision is also
checked only if there is a PD contract.
Fixes: b9fccfdb4ebb ("usb: typec: ucsi: Get PD revision for partner")
Cc: stable@vger.kernel.org
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240830111645.2134301-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/crypto/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions